r1 配置
router>en
router#conf t
router(config)#host r1
r1(config)#no ip domain-lookup
r1(config)#ban mot #Welcome to r1#
r1(config)#ena sec 123
r1(config)#line vty 0 4
r1(config-line)#no login
r1(config-line)#int f 0/0
r1(config-if)#des link to r2
r1(config-if)#ip add 192.168.1.2 255.255.255.0
r1(config-if)#no shut
r1(config-if)#end
r1#
r2 配置
router>en
router#conf t
router(config)#host r2
r2(config)#no ip domain-lookup
r2(config)#ban mot #Welcome to r2#
r2(config)#ena sec 123
r2(config)#line vty 0 4
r2(config-line)#no login
r2(config-line)#int f 0/0
r2(config-if)#des link to r1
r2(config-if)#ip add 192.168.1.1 255.255.255.0
r2(config-if)#no shut
r2(config-line)#int f 1/0
r2(config-if)#des link to r3
r2(config-if)#ip add 192.168.2.1 255.255.255.0
r2(config-if)#no shut
r2(config-line)#int f 2/0
r2(config-if)#des link to r4
r2(config-if)#ip add 192.168.3.1 255.255.255.0
r2(config-if)#no shut
r2(config-if)#router odr
r2(config-if)#network 192.168.1.0
r2(config-if)#network 192.168.2.0
r2(config-if)#network 192.168.3.0
r2(config-if)#exit
r2(config)#ip route 0.0.0.0 0.0.0.0 192.168.2.2
r2#
r3 配置
router>en
router#conf t
router(config)#host r3
r3(config)#no ip domain-lookup
r3(config)#ban mot #Welcome to r3#
r3(config)#ena sec 123
r3(config)#line vty 0 4
r3(config-line)#no login
r3(config-line)#int f 0/0
r3(config-if)#des link to r2
r3(config-if)#ip add 192.168.2.2 255.255.255.0
r3(config-if)#no shut
r3(config-if)#end
r3#
r4 配置
router>en
router#conf t
router(config)#host r4
r4(config)#no ip domain-lookup
r4(config)#ban mot #Welcome to r4#
r4(config)#ena sec 123
r4(config)#line vty 0 4
r4(config-line)#no login
r4(config-line)#int f 0/0
r4(config-if)#des link to r2
r4(config-if)#ip add 192.168.3.2 255.255.255.0
r4(config-if)#no shut
r4(config-if)#end
r4#
Welcome to r1
r1>
r1>en
Password:
r1#show ip route
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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 192.168.1.1 to network 0.0.0.0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
o* 0.0.0.0/0 [160/1] via 192.168.1.1, 00:00:41, FastEthernet0/0
r1#show run
Building configuration...
Current configuration : 579 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r1
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$iZTy$M90KelExOp/86ipFLarE20
!
no aaa new-model
ip subnet-zero
!
!
no ip domain lookup
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
description link to r2
ip address 192.168.1.2 255.255.255.0
duplex half
!
ip classless
no ip http server
!
!
!
!
!
!
!
!
gatekeeper
shutdown
!
banner motd ^CWelcome to r1^C
!
line con 0
stopbits 1
line aux 0
line vty 0 4
!
!
end
r1#192.168.1.1
Trying 192.168.1.1 ... Open
Welcome to r2
r2>en
Password:
r2#show ip route
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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 192.168.2.2 to network 0.0.0.0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
C 192.168.2.0/24 is directly connected, FastEthernet1/0
C 192.168.3.0/24 is directly connected, FastEthernet2/0
S* 0.0.0.0/0 [1/0] via 192.168.2.2
r2#show run
Building configuration...
Current configuration : 908 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r2
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$2/n3$4uh5HkkJs.6OR/chQ5Kmd/
!
no aaa new-model
ip subnet-zero
!
!
no ip domain lookup
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
description link to r1
ip address 192.168.1.1 255.255.255.0
duplex half
!
interface FastEthernet1/0
description link to r3
ip address 192.168.2.1 255.255.255.0
duplex half
!
interface FastEthernet2/0
description link to r4
ip address 192.168.3.1 255.255.255.0
duplex half
!
router odr
network 192.168.1.0
network 192.168.2.0
network 192.168.3.0
!
ip classless
ip route 0.0.0.0 0.0.0.0 192.168.2.2
no ip http server
!
!
!
!
!
!
!
!
!
gatekeeper
shutdown
!
banner motd ^CWelcome to r2^C
!
line con 0
stopbits 1
line aux 0
line vty 0 4
no login
!
!
end
r2#192.168.2.2
Trying 192.168.2.2 ... Open
Wlecome to r3
r3>en
Password:
r3#show ip route
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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 192.168.2.1 to network 0.0.0.0
C 192.168.2.0/24 is directly connected, FastEthernet0/0
o* 0.0.0.0/0 [160/1] via 192.168.2.1, 00:00:57, FastEthernet0/0
r3#show run
Building configuration...
Current configuration : 589 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r3
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$nuQ/$tERP9P/XV2VMfrPliV4Wz/
!
no aaa new-model
ip subnet-zero
!
!
no ip domain lookup
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
description link to r2
ip address 192.168.2.2 255.255.255.0
duplex half
!
ip classless
no ip http server
!
!
!
!
!
!
!
!
!
gatekeeper
shutdown
!
banner motd ^CWlecome to r3^C
!
line con 0
stopbits 1
line aux 0
line vty 0 4
no login
!
!
end
Trying 192.168.3.2 ... Open
Welcome to r4
r4>en
Password:
r4#show ip route
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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 192.168.3.1 to network 0.0.0.0
C 192.168.3.0/24 is directly connected, FastEthernet0/0
o* 0.0.0.0/0 [160/1] via 192.168.3.1, 00:01:48, FastEthernet0/0
r4#show run
Building configuration...
Current configuration : 589 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r4
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$F0G6$t0ktqEsHTPsvCyWEaT2HF1
!
no aaa new-model
ip subnet-zero
!
!
no ip domain lookup
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
description link to r2
ip address 192.168.3.2 255.255.255.0
duplex half
!
ip classless
no ip http server
!
!
!
!
!
!
!
!
!
gatekeeper
shutdown
!
banner motd ^CWelcome to r4^C
!
line con 0
stopbits 1
line aux 0
line vty 0 4
no login
!
!
end
r4#
Cisco路由器常用查看命令
Cisco ODR配置示例
原创空间
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M