2021/12/2小型网络思科设备仿真实现

小型网络思科设备仿真实现互通

要求实现以下功能:综合实验拓扑图如下所示
1、局域网全网互通
2、每个区域主机都能自动获取IP、域名等信息,并通过域名访问内部Web服务器
3、二层和三层交换机间需要冗余链路加强稳定可靠性
4、利用NAT计算实现内网主机利用极少数的公网地址上网访问外网服务器
5、外网服务器能访问内网服务器
6、各网络设备(二层、三层及出口路由器)均可进行telnet网管

2021/12/2小型网络思科设备仿真实现_第1张图片

2021/12/2小型网络思科设备仿真实现_第2张图片

1.对二层交换机进行配置:

Switch>en
Switch#config
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#vlan 10
Switch(config-vlan)#int f0/1
Switch(config-if)#switchport access vlan 10
Switch(config-if)#exit
Switch(config)#vlan 20
Switch(config-vlan)#int f0/2
Switch(config-if)#switchport access vlan 20
Switch(config-if)#exit
//上述是vlan划分
Switch(config)#int range f0/3-4
Switch(config-if-range)#channel-group 1 mode on
//上述是端口聚合配置
%LINK-5-CHANGED: Interface Port-channel 1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel 1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up
Switch(config-if-range)#
Switch(config-if-range)#switchport mode trunk
//上述是trunk的配置
Switch(config-if-range)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel 1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel 1, changed state to up

Switch(config-if-range)#exit
Switch(config)#line vty 0 4
Switch(config-line)#password 123
Switch(config-line)#login
Switch(config-line)#exit
Switch(config)#
//上述是TELNET配置
%LINK-5-CHANGED: Interface FastEthernet0/4, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up

2.对三层交换机配置:

Switch>
Switch>
Switch>en
Switch#config
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#vlan 10
Switch(config-vlan)#exit
Switch(config)#vlan 20
Switch(config-vlan)#exit
Switch(config)#vlan 30
Switch(config-vlan)#exit
//上述是VLAN划分
Switch(config)#int f0/2
Switch(config-if)#switchport access vlan 30
Switch(config-if)#exit
//上述是将与服务器连接端口划入VLAN30
Switch(config)#int range f0/3-4
Switch(config-if-range)#channel-group 1 mode on
//上述是端口聚合
//注意思科上仿真在二层交换机上设置了trunk模式就不用在三层交换机上设trunk了,实在需要可以输入以下命令
//Switch(config-if)#switchport trunk encapsulation dot1q
//Switch(config-if)#switchport mode trunk
%LINK-5-CHANGED: Interface Port-channel 1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel 1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up
Switch(config-if-range)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up

Switch(config-if-range)#exit
Switch(config)#int vlan 10
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up

Switch(config-if)#ip add 
%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel 1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel 1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up

% Incomplete command.
Switch(config-if)#ip add 192.168.1.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#exit
Switch(config)#int vlan 20

%LINK-5-CHANGED: Interface Vlan20, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up
Switch(config-if)#
Switch(config-if)#ip add 192.168.2.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#exit
Switch(config)#int vlan 30
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan30, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan30, changed state to up

Switch(config-if)#ip add 192.168.3.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#exit
//以上是SVI设置
Switch(config)#int f0/1
Switch(config-if)#no switchport 
Switch(config-if)#ip add 192.168.10.2 255.255.255.0
Switch(config-if)#exit
//这一步很关键,no switchport命令已经将接口配置为三层,二层的命令也不适用了,所以要先配完之前的,才能到这一步
Switch(config)#ip route 0.0.0.0 0.0.0.0 192.168.10.1
//设置默认路由
Switch(config)#ip dhcp pool vlan10
Switch(dhcp-config)#network 192.168.1.0 255.255.255.0
Switch(dhcp-config)#default-router 192.168.1.1
Switch(dhcp-config)#dns-server 192.168.3.2
Switch(dhcp-config)#exit
Switch(config)#ip dhcp pool vlan20
Switch(dhcp-config)#network 192.168.2.0 255.255.255.0
Switch(dhcp-config)#default-router 192.168.2.1
Switch(dhcp-config)#dns-server 192.168.3.2
Switch(dhcp-config)#exit
//DHCP的命令配置
Switch(config)#enable password 123
Switch(config)#line vty 0 4
Switch(config-line)#password 456
Switch(config-line)#login
Switch(config-line)#exit
Switch(config)#
//TELNET设置

3.对出口路由器1的配置:

Router>en
Router#config
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int f0/1
Router(config-if)#ip add 192.168.10.1 255.255.255.0
Router(config-if)#no shut

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

Router(config-if)#
Router(config-if)#exit
Router(config)#int f0/0
Router(config-if)#ip add 200.8.7.2 255.255.255.0
Router(config-if)#no shut
//以上是直连路由设置
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

Router(config-if)#exit
Router(config)#ip route 0.0.0.0 0.0.0.0 200.8.7.3//默认路由,注意200.8.7.3是下一跳IP地址
Router(config)#ip route 192.168.1.0 255.255.255.0 192.168.10.2
Router(config)#ip route 192.168.2.0 255.255.255.0 192.168.10.2
Router(config)#ip route 192.168.3.0 255.255.255.0 192.168.10.2
//上述是将将内网的网段和出口路由之间连接配置
Router(config)#int f0/1
Router(config-if)#ip nat inside 
Router(config-if)#exit
Router(config)#int f0/0
Router(config-if)#ip nat outside
Router(config-if)#exit
Router(config)#ip nat pool abc 200.8.7.2 200.8.7.2 netmask 255.255.255.0
Router(config)#access-list 10 permit 192.168.1.0 255.255.255.0
Router(config)#access-list 10 permit 192.168.2.0 255.255.255.0
Router(config)#ip nat inside source list 10 pool abc overload
//上述是动态NAPT技术设置
Router(config)#ip nat inside source static tcp 192.168.3.2 80 200.8.7.4 80
//上述是静态NAPT技术设置,这里需要注意192.168.3.2是内部服务器的IP地址,200.8.7.4是除出口路由和外部路由相连的两个端口IP地址的相同网段任意一个IP地址也可以设计为200.8.7.5等等,但是在配置外部服务器的DNS时需要和这个IP对应
Router(config)#enable password 123
Router(config)#line vty 0 4
Router(config-line)#password 456
Router(config-line)#login
Router(config-line)#
//TELNET 设置

4.对外部路由器2的配置:

Router>en
Router#config
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int f0/0
Router(config-if)#ip add 200.8.7.3 255.255.255.0
Router(config-if)#no shut

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

Router(config-if)#exit
Router(config)#int f0/1
Router(config-if)#ip add 60.0.0.1 255.0.0.0
Router(config-if)#no shut

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

Router(config-if)#exit
//以上是直连路由配置
Router(config)#ip route 0.0.0.0 0.0.0.0 200.8.7.2
//默认路由 200.8.7.2是下一跳端口IP地址
Router(config)#enable password 123
Router(config)#line vty 0 4
Router(config-line)#password 456
Router(config-line)#login
Router(config-line)#exit
Router(config)#
//TELNET设置

5.PC机的配置

2021/12/2小型网络思科设备仿真实现_第3张图片

2021/12/2小型网络思科设备仿真实现_第4张图片

6.内部Server的配置

2021/12/2小型网络思科设备仿真实现_第5张图片
2021/12/2小型网络思科设备仿真实现_第6张图片

7.外部Server的配置:

2021/12/2小型网络思科设备仿真实现_第7张图片

2021/12/2小型网络思科设备仿真实现_第8张图片

8.测试可以通过(不再赘述)

2021/12/2小型网络思科设备仿真实现_第9张图片

你可能感兴趣的:(网络,服务器,思科,网络规划设计)