一 图例
二 设备:
router0_2811_NM_2FE2W(一个2811型的路由器,接一个2FE2W模块)
router1_2811
router2_2811
router3_2811
pc1
pc2
pc3
注:在配置路由是出现" Continue with configuration dialog? [yes/no]:" 请输入 "n"
三 配置
1. router0_2811_NM_2FE2W 的配置:
端口配置:
FastEthernet0/0 12.12.12.1
FastEthernet0/1 13.13.13.1
FastEthernet1/0 14.14.14.1
路由配置
10.0.0.0/24 is subnetted, 1 subnets
S 10.1.1.0 [1/0] via 12.12.12.2
12.0.0.0/24 is subnetted, 1 subnets
C 12.12.12.0 is directly connected, FastEthernet0/0
13.0.0.0/24 is subnetted, 1 subnets
C 13.13.13.0 is directly connected, FastEthernet0/1
14.0.0.0/24 is subnetted, 1 subnets
C 14.14.14.0 is directly connected, FastEthernet1/0
20.0.0.0/24 is subnetted, 1 subnets
S 20.1.1.0 [1/0] via 13.13.13.2
30.0.0.0/24 is subnetted, 1 subnets
S 30.1.1.0 [1/0] via 14.14.14.2
端口配置命令:
FastEthernet0/0 12.12.12.1
Router>enable
Router#configure terminal (进入全局配置模式)
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastEthernet 0/0 (进入端口配置)
Router(config-if)#ip address 12.12.12.1 255.255.255.0
Router(config-if)#no shutdown (激活端口)
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
继续配置 FastEthernet0/1 13.13.13.1
Router(config)#interface fastEthernet 0/1
Router(config-if)#ip address 13.13.13.1 255.255.255.0
Router(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
继续配置 FastEthernet1/0 14.14.14.1
Router(config)#interface fastEthernet 1/0
Router(config-if)#ip address 14.14.14.1 255.255.255.0
Router(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up
Router(config-if)#end
路由表配置命令:
回车继续。。。。。。
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip route 20.1.1.0 255.255.255.0 13.13.13.2
Router(config)#ip route 10.1.1.0 255.255.255.0 12.12.12.2
Router(config)#ip route 30.1.1.0 255.255.255.0 14.14.14.2
Router(config)#end
2. router1_2811的配置:
端口配置:
FastEthernet0/0 12.12.12.2
FastEthernet0/1 10.1.1.1
路由配置
10.0.0.0/24 is subnetted, 1 subnets
C 10.1.1.0 is directly connected, FastEthernet0/1
12.0.0.0/24 is subnetted, 1 subnets
C 12.12.12.0 is directly connected, FastEthernet0/0
20.0.0.0/24 is subnetted, 1 subnets
S 20.1.1.0 [1/0] via 12.12.12.1
30.0.0.0/24 is subnetted, 1 subnets
S 30.1.1.0 [1/0] via 12.12.12.1
端口配置命令:
FastEthernet0/0 12.12.12.2
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 12.12.12.2 255.255.255.0
Router(config-if)#no shutdown (激活端口)
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
继续配置 FastEthernet0/1 10.1.1.1
Router(config)#interface fastEthernet 0/1
Router(config-if)#ip address 10.1.1.1 255.255.255.0
Router(config-if)#no shutdown (激活端口)
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
Router(config-if)#end
路由表配置命令:
回车继续。。。。。。
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip route 20.1.1.0 255.255.255.0 12.12.12.1
Router(config)#ip route 30.1.1.0 255.255.255.0 12.12.12.1
Router(config)#end
3. router2_2811的配置:
端口配置:
FastEthernet0/0 13.13.13.2
FastEthernet0/1 20.1.1.1
路由配置
10.0.0.0/24 is subnetted, 1 subnets
S 10.1.1.0 [1/0] via 13.13.13.1
13.0.0.0/24 is subnetted, 1 subnets
C 13.13.13.0 is directly connected, FastEthernet0/0
20.0.0.0/24 is subnetted, 1 subnets
C 20.1.1.0 is directly connected, FastEthernet0/1
30.0.0.0/24 is subnetted, 1 subnets
S 30.1.1.0 [1/0] via 13.13.13.1
端口配置命令:
FastEthernet0/0 13.13.13.2
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 13.13.13.2 255.255.255.0
Router(config-if)#no shutdown (激活端口)
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
继续配置 FastEthernet0/1 20.1.1.1
Router(config)#interface fastEthernet 0/1
Router(config-if)#ip address 20.1.1.1 255.255.255.0
Router(config-if)#no shutdown (激活端口)
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
Router(config-if)#end
路由表配置命令:
回车继续。。。。。。
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip route 10.1.1.0 255.255.255.0 13.13.13.1
Router(config)#ip route 30.1.1.0 255.255.255.0 13.13.13.1
Router(config)#end
4. router3_2811的配置:
端口配置:
FastEthernet0/0 14.14.14.2
FastEthernet0/1 30.1.1.1
路由配置
10.0.0.0/24 is subnetted, 1 subnets
S 10.1.1.0 [1/0] via 14.14.14.1
14.0.0.0/24 is subnetted, 1 subnets
C 14.14.14.0 is directly connected, FastEthernet0/0
20.0.0.0/24 is subnetted, 1 subnets
S 20.1.1.0 [1/0] via 14.14.14.1
30.0.0.0/24 is subnetted, 1 subnets
C 30.1.1.0 is directly connected, FastEthernet0/1
端口配置命令:
FastEthernet0/0 14.14.14.2
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 14.14.14.2 255.255.255.0
Router(config-if)#no shutdown (激活端口)
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
继续配置 FastEthernet0/1 30.1.1.1
Router(config)#interface fastEthernet 0/1
Router(config-if)#ip address 30.1.1.1 255.255.255.0
Router(config-if)#no shutdown (激活端口)
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
Router(config-if)#end
路由表配置命令:
回车继续。。。。。。
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip route 10.1.1.0 255.255.255.0 14.14.14.1
Router(config)#ip route 20.1.1.0 255.255.255.0 14.14.14.1
Router(config)#end
pc 配置
pc1 10.1.1.2 255.255.255.0 10.1.1.1
pc2 20.1.1.2 255.255.255.0 20.1.1.1
pc3 30.1.1.2 255.255.255.0 30.1.1.1
如有问题多多指教。qq :906799412
本文出自 “Linux初级” 博客,转载请与作者联系!