公司近期要虚拟真实的不同段的IP环境,进行测试;要求在原有的网络基础上完成!
公司原通过一个linksys的路由器接入到2层交换,完成以上升级需添置一台2610和一台2950。
公司的网络拓扑图
目的
测试时值需要更改pc机上的网关为2610的ip地址即可连接到2950后面的不同网段服务器
步骤
一、在2950上划分几个vlan,不同段服务器接入不同段口
二、在2610上单臂路由,通过子接口完成和2950的对接
基本配置
Cisco Internetwork Operating System Software
IOS (tm) C2600 Software (C2600-J1S3-M), Version 12.3(18), RELEASE SOFTWARE (fc3)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2006 by cisco Systems, Inc.
Compiled Wed 15-Mar-06 14:15 by dchih
Image text-base: 0x80008098, data-base: 0x81A37E64
ROM: System Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)
ROM: C2600 Software (C2600-J1S3-M), Version 12.3(18), RELEASE SOFTWARE (fc3)
Router uptime is 2 hours, 26 minutes
System returned to ROM by power-on
System image file is "flash:c2600-j1s3-mz.123-18.bin"
cisco 2610 (MPC860) processor (revision 0x203) with 61440K/4096K bytes of memory
.
Processor board ID JAD05060V5P (4006862464)
M860 processor: part number 0, mask 49
Bridging software.
X.25 software, Version 3.0.0.
TN3270 Emulation software.
2 Ethernet/IEEE 802.3 interface(s)
1 Serial network interface(s)
32K bytes of non-volatile configuration memory.
16384K bytes of processor board System flash (Read/Write)
Configuration register is 0x2102
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
enable password #@gang
!
aaa new-model
!
aaa session-id common
ip subnet-zero
!
!
!
ip cef
username xxxx password 0 xxxx
!
!
!
!
interface Ethernet0/0
ip address 192.168.0.2 255.255.255.0
half-duplex
!
interface Serial0/0
no ip address
shutdown
!
interface Ethernet1/0
no ip address
full-duplex
!
interface Ethernet1/0.1
encapsulation dot1Q 2
ip address 10.1.1.1 255.255.255.0
no snmp trap link-status
!
interface Ethernet1/0.2
encapsulation dot1Q 3
ip address 10.1.2.1 255.255.255.0
no snmp trap link-status
!
interface Ethernet1/0.3
encapsulation dot1Q 4
ip address 10.1.3.1 255.255.255.0
no snmp trap link-status
!
interface Ethernet1/0.4
encapsulation dot1Q 5
ip address 10.1.4.1 255.255.255.0
no snmp trap link-status
!
no ip http server
ip classless
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
password xxxx
!
end
Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(9)EA1, RELEASE SOFTWARE (
fc1)
Copyright (c) 1986-2002 by cisco Systems, Inc.
Compiled Wed 24-Apr-02 06:57 by antonino
Image text-base: 0x80010000, data-base: 0x804E8000
ROM: Bootstrap program is CALHOUN boot loader
Switch uptime is 2 hours, 31 minutes
System returned to ROM by power-on
System image file is "flash:/c2950-i6q4l2-mz.121-9.EA1.bin"
cisco WS-C2950-12 (RC32300) processor (revision F0) with 20815K bytes of memory.
Processor board ID FOC0635Z2BN
Last reset from system-reset
Running Standard Image
12 FastEthernet/IEEE 802.3 interface(s)
32K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address: 00:0A:B7:FD:E6:40
Motherboard assembly number: 73-5782-11
Power supply part number: 34-0965-01
Motherboard serial number: FOC06350L2P
Power supply serial number: DAB062862DL
Model revision number: F0
Motherboard revision number: A0
Model number: WS-C2950-12
System serial number: FOC0635Z2BN
Configuration register is 0xF
Current configuration : 1630 bytes
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Switch
!
aaa new-model
enable password xxxxx
!
username xxxxx password 0 xxxx
ip subnet-zero
!
spanning-tree extend system-id
!
!
interface FastEthernet0/1
no ip address
!
interface FastEthernet0/2
switchport access vlan 2
switchport mode access
no ip address
!
interface FastEthernet0/3
switchport access vlan 2
switchport mode access
no ip address
!
interface FastEthernet0/4
switchport access vlan 2
switchport mode access
no ip address
!
interface FastEthernet0/5
switchport access vlan 3
switchport mode access
no ip address
!
interface FastEthernet0/6
switchport access vlan 3
switchport mode access
no ip address
!
interface FastEthernet0/7
switchport access vlan 3
switchport mode access
no ip address
!
interface FastEthernet0/8
switchport access vlan 5
switchport mode access
no ip address
!
interface FastEthernet0/9
switchport access vlan 4
switchport mode access
no ip address
!
interface FastEthernet0/10
no ip address
!
interface FastEthernet0/11
no ip address
!
interface FastEthernet0/12
switchport mode trunk
switchport nonegotiate
no ip address
duplex full
speed 10
!
interface Vlan1
ip address 192.168.0.221 255.255.255.0
no ip route-cache
!
interface Vlan2
no ip address
no ip route-cache
shutdown
!
interface Vlan3
no ip address
no ip route-cache
shutdown
!
interface Vlan4
no ip address
no ip route-cache
shutdown
!
interface Vlan5
no ip address
no ip route-cache
shutdown
!
ip http server
!
!
line con 0
line vty 5 15
!
end
完成,只需更改本地计算机的网关即可访问虚拟测试机
总结
一、最开始在2610上配置子接口的时候,配置后show interface发现子接口都是down的状态,上网查询以为是10m接口不支持,好在更换了ios后问题解决;
二、划分vlan时,做fast 0/12汇聚时无法ping到2610子接口地址;原配置为switchport mode trunk
switchport trunk vlan native,后更改为switchport nonegotiate 所以子接口地址都可ping通;
三、每个划分到vlan接口必须配置switchport mode access;
四、虚拟服务器的网关必须配制成子接口的地址
五、2950里vlan只有一个会no shutdown,并不影响使用,这个应该是管理vlan
网上有些配置并不可行,具体情况要具体而定,希望能给朋友们做个借鉴!!