《企业项目综合实战》综合实训(一)
课题
组号:小组成员:_____________________
背景介绍:
模拟某企业办公局域网访问互联网WEB服务器上的资源,并实现全网互联。在局域网中划分VLAN,客户端PC能够对全网的交换机和路由器进行telnet远程控制,并禁止192.168.1.0/24访问服务器的WEB服务。
地址规划如下图,192.168.1.0/24的网关地址为192.168.1.1,192.168.2.0/24的网关地址为192.168.2.1。客户端1和客户端3处于VLAN2,客户端2和客户端4处于VLAN3。
实验设备:
路由器两台(每台可以提供至少2个以太网口,不含广域网V35线缆),三层交换机一台,二层交换机三台,普通电脑4台,服务器1台,直连网线10条,压线钳一个,平口钳一个,测线仪一个,网线若干,水晶头若干,标签纸若干(12个标签)。
服务器上已经安装好window 2003 Server,主页文件一个(文件名index.htm)。
实验要求:
1、如图,选择提供的设备并进行互联,缺少的线缆自己动手制作,贴上设备的标签;(10分)
2、配置Web服务器,使其能通过IP地址访问。验证:使得Web服务器自身能通过http://127.0.0.1访问其主页(index.htm);(10分)
3、配置RouterA。配置主机名为RouterA;设置密码;配置接口地址;配置动态路由RIP协议;配置访问控制列表,禁止192.168.1.0/24访问服务器的WEB服务;配置NAT,使得内网192.168.1.0/24和192.168.2.0/24网段可以访问外网,且访问外网的源地址为100.0.0.1;捕获文字并保存为RouterA.txt;(20分)
4、配置RouerB。配置主机名为RouterB;设置密码;配置接口地址;配置动态路由RIP协议。捕获文字并保存为RouterB.txt;(10分)
5、配置SwitchA。配置主机名为SwitchA;设置密码;上行口F0/24启用三层路由功能,配置IP地址192.168.3.2/24;设置vlan1管理IP:192.168.0.2/24;配置链路聚合,设置F0/1和F0/2为聚合端口1,分别将聚合端口、F0/3、F0/4配置为Trunk接口;在交换机上创建VLAN2、VLAN3并配置相应的交换虚拟接口(SVI)地址,其中,VLAN2为192.168.1.1/24,VLAN3为192.168.2.1/24;配置动态路由RIP协议。捕获文字并保存为SwitchA.txt;(15分)
6、配置SwitchB,配置主机名为SwitchB;设置vlan1管理IP:192.168.0.3/24和密码。在交换机上创建VLAN2、VLAN3;将F0/1和F0/2设置为聚合端口1;并将聚合端口设置为Trunk接口,下行接口配置到相应的VLAN当中。捕获文字并保存为SwitchB.txt。(10分)
7、配置SwitchC和SwitchD,主机名分别为SwitchC和SwitchD;分别设置vlan1管理IP和密码,其中SwitchC管理IP为192.168.0.4/24,SwitchD管理IP为192.168.0.5/24;设备上行口配置为Trunk接口,下行接口配置到相应的VLAN当中。捕获文字并保存为SwitchC.txt、SwitchD.txt。(10分)
8、验证:客户端2和客户端4可以访问200.0.0.100的主页;(5分)
9、验证:客户端1能够对全网的交换机和路由器进行telnet远程控制;(5分)
10、验证:switchA和switchB间链路断开任意一条,客户端1仍然可以ping通网关;(5分)
注:
1、实验步骤顺序可以自己规划,但是每一小步骤中要求验证的步骤,完成后需要经过老师的确认;
2、所有密码统一为888888;
答题
SwitchB
Switch>en
Switch#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname SwitchB
SwitchB(config)#vlan 2
SwitchB(config-vlan)#vlan 3
SwitchB(config-vlan)#exit
SwitchB(config)#int f0/1
SwitchB(config-if)#sw access vlan 2
SwitchB(config-if)#exit
SwitchB(config)#int f0/2
SwitchB(config-if)#sw ac vla 3
SwitchB(config-if)#exit
SwitchB(config)#int ran
SwitchB(config)#int range f0/23
SwitchB(config-if-range)#exit
SwitchB(config)#int range f0/23-24
SwitchB(config-if-range)#channel-group 1 mode auto
SwitchB(config-if-range)#
Creating a port-channel interface Port-channel 1
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/23, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/23, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to up
SwitchB(config-if-range)#exit
SwitchB(config)# int por
SwitchB(config)# int port-channel 1
SwitchB(config-if)#sw mo tru
SwitchB(config-if)#sw mo trunk
SwitchB(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/23, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/23, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to up
%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
SwitchB(config-if)#no shutdown
SwitchB(config-if)#exit
SwitchB(config)#int vlan 1
SwitchB(config-if)#ip add 192.168.0.3 255.255.255.0
SwitchB(config-if)#exit
SwitchB(config)#ena
SwitchB(config)#enable pass
SwitchB(config)#enable password 888888
SwitchB(config)#line vty 0 4
SwitchB(config-line)#pass
SwitchB(config-line)#password 888888
SwitchB(config-line)#login
SwitchB(config-line)#exit
SwitchB(config)#exit
SwitchB#sh ru
Building configuration...
Current configuration : 1245 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname SwitchB
!
enable password 888888
!
!
!
spanning-tree mode pvst
!
interface FastEthernet0/1
switchport access vlan 2
!
interface FastEthernet0/2
switchport access vlan 3
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
channel-group 1 mode auto
switchport mode trunk
!
interface FastEthernet0/24
channel-group 1 mode auto
switchport mode trunk
!
interface Port-channel 1
switchport mode trunk
!
interface Vlan1
ip address 192.168.0.3 255.255.255.0
shutdown
!
!
!
!
line con 0
!
line vty 0 4
password 888888
login
line vty 5 15
login
!
!
end
SwitchB#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
SwitchB(config)#int vlan 1
SwitchB(config-if)#no shu
SwitchB(config-if)#no shutdown
SwitchB(config-if)#
%LINK-5-CHANGED: Interface Vlan1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
SwitchB(config-if)#exit
SwitchB(config)#end
SwitchB#
%SYS-5-CONFIG_I: Configured from console by console
SwitchB>en
Password:
Password:
Password:
SwitchB#
SwitchB#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
SwitchB(config)#ip de
SwitchB(config)#ip default-gateway
SwitchB(config)#ip default-gateway 192.168.0.2
Switch C
Switch>en
Switch#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 2
Switch(config-vlan)#exit
Switch(config)#hostname SwitchC
SwitchC(config)#int f0/24
SwitchC(config-if)#sw mod tr
SwitchC(config-if)#sw mod trunk
SwitchC(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to up
SwitchC(config-if)#int f0/2
SwitchC(config-if)#sw ac vl 2
SwitchC(config-if)#exit
SwitchC(config)#ip defa
SwitchC(config)#ip default-gateway 192.168.0.2
SwitchC(config)#enable passw
SwitchC(config)#enable password 888888
SwitchC(config)#line vty 0 4
SwitchC(config-line)#passw
SwitchC(config-line)#password 888888
SwitchC(config-line)#login
SwitchC(config-line)#exit
SwitchC(config)#exit
SwitchC#
%SYS-5-CONFIG_I: Configured from console by console
SwitchC#sh ru
Building configuration...
Current configuration : 1102 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname SwitchC
!
enable password 888888
!
!
!
spanning-tree mode pvst
!
interface FastEthernet0/1
!
interface FastEthernet0/2
switchport access vlan 2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
switchport mode trunk
!
interface Vlan1
no ip address
shutdown
!
ip default-gateway 192.168.0.2
!
!
!
!
line con 0
!
line vty 0 4
password 888888
login
line vty 5 15
login
!
!
end
SwitchC# conf ter
Enter configuration commands, one per line. End with CNTL/Z.
SwitchC(config)#int vlan 1
SwitchC(config-if)#ip add 192.168.0.4 255.255.255.0
SwitchC(config-if)#no shu
SwitchC(config-if)#no shutdown
SwitchC(config-if)#
%LINK-5-CHANGED: Interface Vlan1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
SwitchC(config-if)#exit
SwitchC(config)#
SwitchA
Switch>
Switch>
Switch>en
Switch#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname SwitchA
SwitchA(config)#int ran
SwitchA(config)#int range f0/1-2
SwitchA(config-if-range)#chane
SwitchA(config-if-range)#channe
SwitchA(config-if-range)#channel
SwitchA(config-if-range)#channel-gr
SwitchA(config-if-range)#channel-group 1 mode au
SwitchA(config-if-range)#channel-group 1 mode auto
SwitchA(config-if-range)#
Creating a port-channel interface Port-channel 1
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up
%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
SwitchA(config-if-range)#exit
SwitchA(config)#int channe
SwitchA(config)#int port
SwitchA(config)#int port-channel 1
SwitchA(config-if)#sw mod tru
Command rejected: An interface whose trunk encapsulation is "Auto" can not be configured to "trunk" mode.
SwitchA(config-if)#sw trunk en
SwitchA(config-if)#sw trunk encapsulation do
SwitchA(config-if)#sw trunk encapsulation dot1q
SwitchA(config-if)#sw mode tru
SwitchA(config-if)#sw mode trunk
SwitchA(config-if)#
%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/2, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up
SwitchA(config-if)#int rang
SwitchA(config-if)#int range
SwitchA(config-if)#int range f0/3-4
SwitchA(config-if-range)#sw trunk en
SwitchA(config-if-range)#sw trunk encapsulation
% Incomplete command.
SwitchA(config-if-range)#sw trunk encapsulation do
SwitchA(config-if-range)#sw trunk encapsulation dot1q
SwitchA(config-if-range)#sw mode trun
SwitchA(config-if-range)#sw mode trunk
SwitchA(config-if-range)#int f0/24
SwitchA(config-if)#no sw
SwitchA(config-if)#ip addr 192.168.3.2 255.255.255.0
SwitchA(config-if)#int vlan 2
SwitchA(config-if)#ip add 192.168.1.1 255.255.255.0
SwitchA(config-if)#no shu
SwitchA(config-if)#no shutdown
SwitchA(config-if)#int vlan 3
SwitchA(config-if)#ip add 192.168.2.1 255.255.255.0
SwitchA(config-if)#no shu
SwitchA(config-if)#no shutdown
SwitchA(config-if)#int vlan 1
SwitchA(config-if)#ip addr 192.168.0.2 255.255.255.0
SwitchA(config-if)#no shutdown
SwitchA(config-if)#exit
SwitchA(config)#do sh ru
Building configuration...
Current configuration : 1662 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname SwitchA
!
!
!
!
!
!
!
ip routing
!
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface Port-channel 1
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/1
channel-group 1 mode auto
switchport mode trunk
!
interface FastEthernet0/2
channel-group 1 mode auto
switchport mode trunk
!
interface FastEthernet0/3
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/4
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
no switchport
ip address 192.168.3.2 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
ip address 192.168.0.2 255.255.255.0
shutdown
!
interface Vlan2
ip address 192.168.1.1 255.255.255.0
!
interface Vlan3
ip address 192.168.2.1 255.255.255.0
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end
SwitchA(config)#
SwitchA(config)#
SwitchA(config)#router rip
SwitchA(config-router)#ver 2
SwitchA(config-router)#net 192.168.0.0
SwitchA(config-router)#net 192.168.1.0
SwitchA(config-router)#net 192.168.2.0
SwitchA(config-router)#net 192.168.3.0
SwitchA(config-router)#no auto
SwitchA(config-router)#exit
SwitchA(config)#end
SwitchA#
%SYS-5-CONFIG_I: Configured from console by console
SwitchA#
SwitchA#conf t
Enter configuration commands, one per line. End with CNTL/Z.
SwitchA(config)#enab
SwitchA(config)#enable passw
SwitchA(config)#enable password 888888
SwitchA(config)#line vty 0 4
SwitchA(config-line)#passw
SwitchA(config-line)#password 888888
SwitchA(config-line)#exit
SwitchA(config)#ip route 0.0.0.0 0.0.0.0 192.168.3.1
SwitchA(config)#end
SwitchA#
%SYS-5-CONFIG_I: Configured from console by console
SwitchA#ping 192.168.0.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.0.3, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
SwitchA#ping 192.168.0.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.0.4, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
SwitchA#ping 192.168.0.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.0.5, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
SwitchA#sh ru
Building configuration...
Current configuration : 1846 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname SwitchA
!
!
!
enable password 888888
!
!
!
!
!
ip routing
!
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface Port-channel 1
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/1
channel-group 1 mode auto
switchport mode trunk
!
interface FastEthernet0/2
channel-group 1 mode auto
switchport mode trunk
!
interface FastEthernet0/3
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/4
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
no switchport
ip address 192.168.3.2 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
ip address 192.168.0.2 255.255.255.0
shutdown
!
interface Vlan2
ip address 192.168.1.1 255.255.255.0
!
interface Vlan3
ip address 192.168.2.1 255.255.255.0
!
router rip
version 2
network 192.168.0.0
network 192.168.1.0
network 192.168.2.0
no auto-summary
!
ip classless
ip route 0.0.0.0 0.0.0.0 192.168.3.1
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
password 888888
login
!
!
!
end
SwitchA#sh ip int b
Interface IP-Address OK? Method Status Protocol
FastEthernet0/1 unassigned YES unset up up
FastEthernet0/2 unassigned YES unset up up
FastEthernet0/3 unassigned YES unset up up
FastEthernet0/4 unassigned YES unset up up
FastEthernet0/5 unassigned YES unset down down
FastEthernet0/6 unassigned YES unset down down
FastEthernet0/7 unassigned YES unset down down
FastEthernet0/8 unassigned YES unset down down
FastEthernet0/9 unassigned YES unset down down
FastEthernet0/10 unassigned YES unset down down
FastEthernet0/11 unassigned YES unset down down
FastEthernet0/12 unassigned YES unset down down
FastEthernet0/13 unassigned YES unset down down
FastEthernet0/14 unassigned YES unset down down
FastEthernet0/15 unassigned YES unset down down
FastEthernet0/16 unassigned YES unset down down
FastEthernet0/17 unassigned YES unset down down
FastEthernet0/18 unassigned YES unset down down
FastEthernet0/19 unassigned YES unset down down
FastEthernet0/20 unassigned YES unset down down
FastEthernet0/21 unassigned YES unset down down
FastEthernet0/22 unassigned YES unset down down
FastEthernet0/23 unassigned YES unset down down
FastEthernet0/24 192.168.3.2 YES manual down down
GigabitEthernet0/1 unassigned YES unset down down
GigabitEthernet0/2 unassigned YES unset down down
Vlan1 192.168.0.2 YES manual administratively down down
Vlan2 192.168.1.1 YES manual up up
Vlan3 192.168.2.1 YES manual up up
Port-channel 1 unassigned YES unset up up
SwitchA#
routeA
Router>
Router>
Router>en
Router#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname RouteA
RouteA(config)#int f0/0
RouteA(config-if)#ip add 192.168.3.1 255.255.255.0
RouteA(config-if)#no shu
RouteA(config-if)#no shutdown
RouteA(config-if)#int f0/1
RouteA(config-if)#ip add 100.0.0.1 255.255.255.0
RouteA(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
RouteA(config-if)#exit
RouteA(config)#enable pas
RouteA(config)#enable password 888888
RouteA(config)#line vty 0 4
RouteA(config-line)#passw
RouteA(config-line)#password 888888
RouteA(config-line)#login
RouteA(config-line)#exit
RouteA(config)#router rip
RouteA(config-router)#ver 2
RouteA(config-router)#net 192.168.3.0
RouteA(config-router)#no au
RouteA(config-router)#no auto-summary
RouteA(config-router)#exit
RouteA(config)#ip route 0.0.0.0 0.0.0.0 100.0.0.2RouteA# conf ter
Enter configuration commands, one per line. End with CNTL/Z.
RouteA(config)#
RouteA(config)#acc
RouteA(config)#access-list 100 de
RouteA(config)#access-list 100 tcp 192.168.1.0 0.0.0.255 host 200.0.0.2 eq www
^
% Invalid input detected at '^' marker.
RouteA(config)#acc
RouteA(config)#access-list 100 de
RouteA(config)#access-list 100 deny t
RouteA(config)#access-list 100 deny tcp 192.168.1.0 0.0.0.255 h
RouteA(config)#access-list 100 deny tcp 192.168.1.0 0.0.0.255 host 200.0.0.2 eq www
RouteA(config)#acc
RouteA(config)#access-list 100 per
RouteA(config)#access-list 100 permit ip an
RouteA(config)#access-list 100 permit ip any
% Incomplete command.
RouteA(config)#access-list 100 permit ip any any
RouteA(config)#int f0/0
RouteA(config-if)#ip ac
RouteA(config-if)#ip access-group 100 in
RouteA(config-if)#do sh r
Building configuration...
Current configuration : 1079 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname RouteA
!
!
!
enable password 888888
!
!
!
!
!
!
no ip cef
no ipv6 cef
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface FastEthernet0/0
ip address 192.168.3.1 255.255.255.0
ip access-group 100 in
ip nat inside
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 100.0.0.1 255.255.255.0
ip nat outside
duplex auto
speed auto
!
interface Vlan1
no ip address
shutdown
!
router rip
version 2
network 192.168.3.0
no auto-summary
!
ip nat pool abc 100.0.0.1 100.0.0.1 netmask 255.255.255.0
ip nat inside source list 1 pool abc overload
ip classless
ip route 0.0.0.0 0.0.0.0 100.0.0.2
!
ip flow-export version 9
!
!
access-list 1 permit 192.168.1.0 0.0.0.255
access-list 1 permit 192.168.2.0 0.0.0.255
access-list 100 deny tcp 192.168.1.0 0.0.0.255 host 200.0.0.2 eq www
access-list 100 permit ip any any
!
no cdp run
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
password 888888
login
!
!
!
end
RouteA(config-if)#
RouterB
Router>
Router>
Router>en
Router#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname RouterB
RouterB(config)#int f0/0
RouterB(config-if)#ip add 100.0.0.2 255.255.255.0
RouterB(config-if)#no shu
RouterB(config-if)#no shutdown
RouterB(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
RouterB(config-if)#int f0/1
RouterB(config-if)#ip add 200.0.0.1 255.255.255.0
RouterB(config-if)#exit
RouterB(config)#router rip
RouterB(config-router)#
RouterB(config-router)#ver 2
RouterB(config-router)#net 200.0.0.0
RouterB(config-router)#no au
RouterB(config-router)#no auto-summary
RouterB(config-router)#exit
RouterB(config)#ena
RouterB(config)#enable passw
RouterB(config)#enable password 888888
RouterB(config)#line vty 0 4
RouterB(config-line)#passw
RouterB(config-line)#password 888888
RouterB(config-line)#exit
RouterB(config)#int f0/1
RouterB(config-if)#no shu
RouterB(config-if)#no shutdown
RouterB(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
RouterB(config-if)#
RouterB(config-if)#exit
RouterB(config)#
查询命令
sh ip int b
sh run
验证
附件