21 RIPv2 动态路由
R1 配置接口 <H3C>system-view [H3C]sysname r1 [r1]interface gigabitethernet 0/0 [r1-GigabitEthernet0/0]ip address 10.10.12.1 24 [H3C-GigabitEthernet0/0]rip authentication-mode simpleplain admin1234 //接口配置RIP认证 [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]version 2 //设置v2版本 [r1-rip-1]undo summary //不执行自动聚合 [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]rip authentication-mode simpleplain Aa123456 [r2-GigabitEthernet0/0]interface gigabitethernet 0/1 [r2-GigabitEthernet0/1]ip address 10.10.23.2 24 [r2-GigabitEthernet0/1]rip authentication-mode simpleplain Aa123456 [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-pc]static-bind ip-address 192.168.30.100hardware-address AABB-CCDD-EEFF //静态IP与MAC地址绑定 [r2-dhcp-pool-zurkj]quit 配置RIP协议 [r2]rip 1 [r2-rip-1]version 2 [r2-rip-1]undo summary [r2-rip-1]network 10.0.0.0 [r2-rip-1]network 192.168.20.0 [r2-rip-1]silent-interface GigabitEthernet 0/2 //配置G 0/2接口为沉默接口(配置抑制接口后只接收不再对外发送RIP更新) [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]rip authentication-mode simpleplain Aa123456 [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]version 2 [r3-rip-1]undo summary [r3-rip-1]network 192.168.30.0 [r3-rip-1]network 10.0.0.0 [r3-rip-1]quit
|