实验需求:
1.全网可达
2.拓扑中所需地址全部基于192.168.0.0/24划分所得
3.静态路由(不许使用其他动态)
4.R8环回需要汇总
实验拓扑图:
实验分析:
实验所需网段由192.168.0.0/24来划分,第一步需要配置各个路由器的地址,划分VLAN交换机使用DHCP协议自动分配PC地址,注意100.1.1.0/24为公网,优先选路
拓扑图标记:
实验配置:
一、路由器接口配置IP地址以及环回的配置
在R1上:
int g 0/0/0
ip add 192.168.0.33 29
int g 0/0/1
ip add 192.168.0.49 29
int loopback1
ip add 192.168.0.65 29
int loopback2
ip add 192.168.0.73 29
int loopback3
ip add 192.168.0.81 29
在R2上:
int g 0/0/0
ip add 192.168.0.34 29
int g 0/0/1
ip add 192.168.0.41 29
在R3上:
int g 0/0/1
ip add 192.168.0.50 29
int g 0/0/0
ip add 192.168.0.57 29
在R4上:
int g 0/0/0
ip add 192.168.0.42
int g 0/0/1
ip add 192.168.0.58
int g 0/0/2
ip add 192.168.0.129 27
int g 4/0/0
ip add 192.168.0.97 27
在R5上:
int g 0/0/1
ip add 192.168.0.98 27
int g 0/0/0
ip add 192.168.0.130 27
int g 0/0/2
ip add 100.1.1.1 24
在ISP上:
int g 0/0/0
ip add 100.1.1.2 24
二、R3创建子接口和DHCP服务,交换机trunk以及划分VLAN
在R3上:
dhcp enable
ip pool aaa
network 192.168.0.0 mask 28
gateway-list 192.168.0.1
dns-list 8.8.8.8
ip pool bbb
network 192.168.0.16 mask 28
gateway-list 192.168.0.17
dns-list 8.8.8.8
int g 0/0/2.1
dot1q termination vid 2
ip address 192.168.0.1 255.255.255.240
arp broadcast enable
dhcp select global
int g 0/0/2.2
dot1q termination vid 3
ip address 192.168.0.17 255.255.255.240
arp broadcast enable
dhcp select global
在SW1上:
int e 0/0/1
port link-type trunk
port trunk allow-pass vlan all
int e 0/0/4
port link-type trunk
port trunk allow-pass vlan all
int e 0/0/2
port link-type access
port default vlan 2
int e 0/0/3
port link-type access
port default vlan 3
在SW2上:
int e 0/0/1
port link-type trunk
port trunk allow-pass vlan all
int e 0/0/2
port link-type access
port default vlan 2
int e 0/0/3
port link-type access
port default vlan 3
在PC上选择DHCP点应用
获取IP地址成功
配置静态路由:
在R1上的配置:
在R2上配置:
在R3上配置:
在R4上配置:
在R5上配置:
在ISP上配置:
实验结果验证:
pc1上Ping环回地址以及100.1.1.2
ISP ping PC以及环回
总结:
本次实验复习了VLAN、DHCP、静态路由的使用,还有浮动静态,缺省路由、
子接口、trunk的使用。