cisco静态路由的应用怎么配置(2)
cisco静态路由的应用怎么配置
学习啦在线学习网 interface FastEthernet0/3
!
学习啦在线学习网 interface FastEthernet0/4
!
学习啦在线学习网 interface FastEthernet0/5
!
学习啦在线学习网 interface FastEthernet0/6
!
interface FastEthernet0/7
!
学习啦在线学习网 interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
学习啦在线学习网 interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
学习啦在线学习网 interface FastEthernet0/15
!
学习啦在线学习网 interface FastEthernet0/16
!
interface FastEthernet0/17
!
学习啦在线学习网 interface FastEthernet0/18
!
学习啦在线学习网 interface FastEthernet0/19
!
interface FastEthernet0/20
!
学习啦在线学习网 interface FastEthernet0/21
!
学习啦在线学习网 interface FastEthernet0/22
!
学习啦在线学习网 interface FastEthernet0/23
!
学习啦在线学习网 interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
学习啦在线学习网 interface Vlan1
no ip address
学习啦在线学习网 shutdown
!
ip classless
学习啦在线学习网 ip route 4.0.0.0 255.0.0.0 FastEthernet0/2
!
!
!
!
!
学习啦在线学习网 line con 0
line vty 0 4
login
!
!
end
Switch#
学习啦在线学习网 Switch 1的配置:
学习啦在线学习网 Switch>
Switch>en
Switch>enable
学习啦在线学习网 Switch#conf
Switch#configure
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
学习啦在线学习网 Switch(config)#int
学习啦在线学习网 Switch(config)#interface f
学习啦在线学习网 Switch(config)#interface fastEthernet 0/1
学习啦在线学习网 Switch(config-if)#no sw
Switch(config-if)#no switchport
学习啦在线学习网 %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upSwitch(config-if)#ip add
Switch(config-if)#ip address 2.2.2.2 255.0.0.0
学习啦在线学习网 Switch(config-if)#no shut
学习啦在线学习网 Switch(config-if)#no shutdown
Switch(config-if)#exit
学习啦在线学习网 Switch(config)#int
Switch(config)#interface f
Switch(config)#interface fastEthernet 0/2
Switch(config-if)#ip add
学习啦在线学习网 Switch(config-if)#no sw
学习啦在线学习网 Switch(config-if)#no switchport
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to upSwitch(config-if)#
Switch(config-if)#ip ad
Switch(config-if)#ip address 3.3.3.1 255.0.0.0
Switch(config-if)#noshut
Switch(config-if)#noshut
^
学习啦在线学习网 % Invalid input detected at '^' marker.
Switch(config-if)#no shut
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#ip rout
学习啦在线学习网 Switch(config)#ip route
学习啦在线学习网 Switch(config)#ip route 1.0.0.0 255.0.0.0 f
学习啦在线学习网 Switch(config)#ip route 1.0.0.0 255.0.0.0 fastEthernet 0/1
学习啦在线学习网 Switch(config)#ip route 4.0.0.0 255.0.0.0 fastEthernet 0/2
Switch(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
Switch#ping 1.1.1.2
学习啦在线学习网 Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.2, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 47/59/63 ms
学习啦在线学习网 Switch#ping 4.4.4.2
Type escape sequence to abort.
学习啦在线学习网 Sending 5, 100-byte ICMP Echos to 4.4.4.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 47/59/63 ms
学习啦在线学习网 Switch#ping 2.2.2.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 ms
Switch#ping 3.3.3.2
Type escape sequence to abort.
学习啦在线学习网 Sending 5, 100-byte ICMP Echos to 3.3.3.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 15/28/32 ms
学习啦在线学习网 Switch#show ip rou
学习啦在线学习网 Switch#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
学习啦在线学习网 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
学习啦在线学习网 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
学习啦在线学习网 i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
学习啦在线学习网 * - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
学习啦在线学习网 S 1.0.0.0/8 is directly connected, FastEthernet0/1
学习啦在线学习网 C 2.0.0.0/8 is directly connected, FastEthernet0/1
学习啦在线学习网 C 3.0.0.0/8 is directly connected, FastEthernet0/2
S 4.0.0.0/8 is directly connected, FastEthernet0/2
Switch#
学习啦在线学习网 Switch 2 的配置:
学习啦在线学习网 Switch>en
学习啦在线学习网 Switch>enable
Switch#conf
学习啦在线学习网 Switch#configure
Switch#configure terminal
学习啦在线学习网 Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int
Switch(config)#interface f
Switch(config)#interface fastEthernet 0/2
Switch(config-if)#no sw
学习啦在线学习网 Switch(config-if)#no switchport
学习啦在线学习网 %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
学习啦在线学习网 %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to upSwitch(config-if)#
学习啦在线学习网 Switch(config-if)#ip add
Switch(config-if)#ip address 3.3.3.2 255.0.0.0
Switch(config-if)#no shut
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#int
Switch(config)#interface f
Switch(config)#interface fastEthernet 0/1
Switch(config-if)#ip add
Switch(config-if)#no sw
Switch(config-if)#no switchport
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
学习啦在线学习网 %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upSwitch(config-if)#
Switch(config-if)#ip add
Switch(config-if)#ip address 4.4.4.1 255.0.0.0
Switch(config-if)#no shut
学习啦在线学习网 Switch(config-if)#no shutdown
学习啦在线学习网 Switch(config-if)#exit
学习啦在线学习网 Switch(config)#ip route 1.0.0.0 255.0.0.0 f
学习啦在线学习网 Switch(config)#ip route 1.0.0.0 255.0.0.0 fastEthernet 0/2
Switch(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
学习啦在线学习网 Switch#ping 4.4.4.2
学习啦在线学习网 Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.2, timeout is 2 seconds:
!!!!!
学习啦在线学习网 Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 ms
Switch#ping 3.3.3.1
学习啦在线学习网 Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 ms
Switch#show ip route
学习啦在线学习网 Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
学习啦在线学习网 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
学习啦在线学习网 P - periodic downloaded static route
Gateway of last resort is not set
S 1.0.0.0/8 is directly connected, FastEthernet0/2
C 3.0.0.0/8 is directly connected, FastEthernet0/2
学习啦在线学习网 C 4.0.0.0/8 is directly connected, FastEthernet0/1
看过文章“cisco静态路由的应用怎么配置”的人还看了: