20 RIPv1 动态路由
R1 配置接口 <H3C>system-view [H3C]sysname r1 [r1]interface gigabitethernet 0/0 [r1-GigabitEthernet0/0]ip address 10.10.12.1 24 [r1-GigabitEthernet0/0]interface loopback 0 [r1-LoopBack0]ip address 192.168.10.100 24 [r1-LoopBack0]quit 配置RIP协议 [r1]rip 1 //创建RIP进程 [r1-rip-1]network 192.168.10.0 //宣告参与网络 [r1-rip-1]network 10.0.0.0 [r1-rip-1]quit
R2 配置接口 <H3C>system-view [H3C]sysname r2 [r2]interface gigabitethernet 0/0 [r2-GigabitEthernet0/0]ip address 10.10.12.2 24 [r2-GigabitEthernet0/0]interface gigabitethernet 0/1 [r2-GigabitEthernet0/1]ip address 10.10.23.2 24 [r2-GigabitEthernet0/1]interface gigabitethernet 0/2 [r2-GigabitEthernet0/2]ip address 192.168.20.1 24 [r2-GigabitEthernet0/2]dhcp select server //DHCP选择服务器 [r2-GigabitEthernet0/2]quit 配置DHCP [r2]dhcp enable //开启DHCP [r2]dhcp server ip-pool zurkj //创建DHCP地址池 [r2-dhcp-pool-zurkj]gateway-list 192.168.20.1 //配置网关 [r2-dhcp-pool-zurkj]network 192.168.20.0 mask 255.255.255.0//配置网段 [r2-dhcp-pool-zurkj]dns-list 114.114.114.114 8.8.8.8 //配置DHCP [r2-dhcp-pool-zurkj]expired day 2 hour 2 minute 2 second2 //配置租约 [r2-dhcp-pool-zurkj]forbidden-ip 192.168.20.1 //配置不参与分配地址 [r2-dhcp-pool-zurkj]forbidden-ip-range 192.168.20.200192.168.20.254 //配置不参与分配地址范围 [r2-dhcp-pool-zurkj]quit 配置RIP协议 [r2]rip 1 [r2-rip-1]network 192.168.20.0 [r2-rip-1]network 10.0.0.0 [r2-rip-1]quit R3 配置接口 <H3C>system-view [H3C]sysname r3 [r3]interface gigabitethernet 0/0 [r3-GigabitEthernet0/0]ip address 10.10.23.3 24 [r3-GigabitEthernet0/0]interface loopback 0 [r3-LoopBack0]ip address 192.168.30.100 24 [r3-LoopBack0]quit 配置RIP协议 [r3]rip 1 [r3-rip-1]network 192.168.30.0 [r3-rip-1]network 10.0.0.0 [r3-rip-1]quit [r3]display ip routing-table protocol rip Summary count : 5 RIP Routing table status : <Active> Summary count : 3 Destination/Mask Proto Pre Cost NextHop Interface 10.10.12.0/24 RIP 100 1 10.10.23.2 GE0/0 192.168.10.0/24 RIP 100 2 10.10.23.2 GE0/0 192.168.20.0/24 RIP 100 1 10.10.23.2 GE0/0 RIP Routing table status : <Inactive> Summary count : 2 Destination/Mask Proto Pre Cost NextHop Interface 10.10.23.0/24 RIP 100 0 0.0.0.0 GE0/0 192.168.30.0/24 RIP 100 0 0.0.0.0 Loop0 |