hcip第一天

子网划分

配置vlan

sw1

​
[sw1]vlan batch 2 to 3
 
[sw1]interface Ethernet0/0/1
[sw1-Ethernet0/0/1]port link-type access
[sw1-Ethernet0/0/1]port default vlan 2   
[sw1]interface Ethernet0/0/2     
[sw1-Ethernet0/0/2]port link-type access   
[sw1-Ethernet0/0/2]port default vlan 3
 
   
[sw1]interface e0/0/3
[sw1-Ethernet0/0/3]port link-type trunk 
[sw1-Ethernet0/0/3]port trunk allow-pass vlan 2 to 3   
[sw1]interface e0/0/4
[sw1-Ethernet0/0/4]port link-type trunk 
[sw1-Ethernet0/0/4]port trunk allow-pass vlan 2 to 3 

​

sw2

[sw2]interface Ethernet0/0/1    
[sw2-Ethernet0/0/1]port link-type access   
[sw2-Ethernet0/0/1]port default vlan 2   
[sw2]interface Ethernet0/0/2     
[sw2-Ethernet0/0/2]port link-type access   
[sw2-Ethernet0/0/2]port default vlan 3

配置路由器子接口并开启dhcp

[r2]int g0/0/2.1

[r2-GigabitEthernet0/0/2.1]ip ad 192.168.1.1 29
[r2-GigabitEthernet0/0/2.1]dot1q termination vid 2

[r2-GigabitEthernet0/0/2.1]arp broadcast enable

 
[r2-GigabitEthernet0/0/2.1]int g0/0/2.2           
[r2-GigabitEthernet0/0/2.2]ip ad 192.168.1.9 29
[r2-GigabitEthernet0/0/2.2]dot1q termination vid 3

[r2-GigabitEthernet0/0/2.2]arp broadcast enable 
[r2-GigabitEthernet0/0/2.2]q
 
[r2]dhcp enable 

[r2]ip pool v2

Info: It's successful to create an IP address pool.
[r2-ip-pool-v2]network 192.168.1.0 mask 29
[r2-ip-pool-v2]gateway-list 192.168.1.1

[r2-ip-pool-v2]dns-list 8.8.8.8

[r2-ip-pool-v2]ip pool v3
Info: It's successful to create an IP address pool.
[r2-ip-pool-v3]network 192.168.1.8 mask 29
[r2-ip-pool-v3]gateway-list 192.168.1.9 
[r2-ip-pool-v3]dns-list 8.8.8.8
 
[r2-ip-pool-v3]int g0/0/2.1
[r2-GigabitEthernet0/0/2.1]dhcp select global 
[r2-GigabitEthernet0/0/2.1]int g0/0/2.2      
[r2-GigabitEthernet0/0/2.2]dhcp select global

配置路由器

r1

[r1]ip route-static 0.0.0.0 0 192.168.1.37
[r1]ip route-static 0.0.0.0 0 192.168.1.26

[r1]ip route-static 192.168.1.0 28 192.168.1.26

[r1]ip route-static 192.168.1.28 30 192.168.1.26
[r1]ip route-static 192.168.1.32 30 192.168.1.37
 
[r1]ip route-static 192.168.1.40 30 192.168.1.37
[r1]ip route-static 192.168.1.40 30 192.168.1.26
[r1]ip route-static 192.168.1.44 30 192.168.1.26 pre 61
[r1]ip route-static 192.168.1.44 30 192.168.1.37 pre 61

[r1]ip route-static 100.1.1.0 24 192.168.1.37        
[r1]ip route-static 100.1.1.0 24 192.168.1.26
 
[r1]ip route-static 192.168.1.0 25 NULL 0

r2

[r2]ip route-static 0.0.0.0 0 192.168.1.30
[r2]ip route-static 192.168.1.0 28 NULL 0    
 
[r2]ip route-static 192.168.1.32 30 192.168.1.30
[r2]ip route-static 192.168.1.36 30 192.168.1.25
     
[r2]ip route-static 192.168.1.0 25 192.168.1.25 
     
[r2]ip route-static 192.168.1.40 30 192.168.1.30
[r2]ip route-static 192.168.1.44 30 192.168.1.30 pre 61
[r2]ip route-static 100.1.1.0 24 192.168.1.30 

r3


[r3]ip route-static 0.0.0.0 0 192.168.1.42
[r3]ip route-static 0.0.0.0 0 192.168.1.46 pre 61
 
[r3]ip route-static 100.1.1.0 24 192.168.1.42    
[r3]ip route-static 100.1.1.0 24 192.168.1.46 pre 61
 
[r3]ip route-static 192.168.1.36 30 192.168.1.34    
[r3]ip route-static 192.168.1.24 30 192.168.1.29
 
[r3]ip route-static 192.168.1.0 28 192.168.1.29 
 
[r3]ip route-static 192.168.1.0 25 192.168.1.29
[r3]ip route-static 192.168.1.0 25 192.168.1.34
 
[r3]ip route-static 192.168.1.0 26 NULL 0

r4


[r4]ip route-static 0.0.0.0 0 192.168.1.33
 
[r4]ip route-static 192.168.1.40 30 192.168.1.33
[r4]ip route-static 192.168.1.44 30 192.168.1.33 pre 61
 
[r4]ip route-static 100.1.1.0 24 192.168.1.33 
         
[r4]ip route-static 192.168.1.0 25 192.168.1.38
 
[r4]ip route-static 192.168.1.0 28  192.168.1.38
[r4]ip route-static 192.168.1.0 28 192.168.1.33
 
[r4]ip route-static 192.168.1.24 30 192.168.1.38
[r4]ip route-static 192.168.1.28 30 192.168.1.33

r5


[r5]ip route-static 0.0.0.0 0 100.1.1.2
[r5]ip route-static 192.168.1.0 26 192.168.1.41
[r5]ip route-static 192.168.1.0 26 192.168.1.45 pre 61

[r5]ip route-static 192.168.1.0 25 192.168.1.41       
[r5]ip route-static 192.168.1.0 25 192.168.1.45 pre 61

[r5]ip route-static 192.168.1.0 28 192.168.1.41       
[r5]ip route-static 192.168.1.0 28 192.168.1.45 pre 61

isp

ip route-static 192.168.1.0 24 100.1.1.1

ping

pc4

pc1

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值