国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網管 > 路由交換 > 正文

在一臺三層交換上,不同VLAN相互通信配置方法

2020-03-07 21:36:35
字體:
來源:轉載
供稿:網友
因為市場部和人事部因為業務上的關系,需要兩臺服務器相互通信,所在還需要在3550上配置VLAN間相互通信
 
 
本實驗需求: 
通過在cisco catalyst 3550來規劃VLAN 100 和VLAN 200,并且配置DHCP 讓VLAN100人事部計算機獲得IP地址為192.168.0.0/24,讓VLAN200市場部計算機獲得IP地址為172.16.0.0/24。因為市場部和人事部因為業務上的關系,需要兩臺服務器相互通信,所在還需要在3550上配置VLAN間相互通信。 

實驗拓撲: 

三層交換機,VLAN,通信配置

實驗過程 第一步 配置Catalyst 3550基礎配置 

復制代碼
代碼如下:

Switch> 
Switch>enable 
Switch#conf t 
Enter configuration commands, one per line. End with CNTL/Z. 
Switch(config)#host 3550 
3550(config)#no ip do lo 
3550(config)#line con 0 
3550(config-line)#no exec-t 
3550(config-line)#logg syn 
3550(config-line)#exit 

第二步 在Catalyst 3550 劃分VLAN 100和VLAN 200 //進入全局配置模式下,劃分VLAN(請問catalyst 3500支持在全局模式下劃分VLAN嗎?) 

復制代碼
代碼如下:

3550(config)#vlan 100 
//給VLAN100命名 
3550(config-vlan)#name renshibo 
3550(config-vlan)#int f0/13 
3550(config-if)#switchport mode access 
3550(config-if)#switchport access vlan 100 
3550(config-if)#spanning-tree portfast 
//請問什么時候需要在交換機接口下配置portfast?這里如果不配置可以嗎? 
%Warning: portfast should only be enabled on ports connected to a single 
host. Connecting hubs, concentrators, switches, bridges, etc... to this 
interface when portfast is enabled, can cause temporary bridging loops. 
Use with CAUTION 
%Portfast has been configured on FastEthernet0/13 but will only 
have effect when the interface is in a non-trunking mode. 
3550(config-if)#vlan 200 
3550(config-vlan)#name shichangbo 
3550(config-vlan)#int f0/15 
3550(config-if)#sw mo acc 
3550(config-if)#sw acc vlan 200 
3550(config-if)#spanning-tree portfast 
%Warning: portfast should only be enabled on ports connected to a single 
host. Connecting hubs, concentrators, switches, bridges, etc... to this 
interface when portfast is enabled, can cause temporary bridging loops. 
Use with CAUTION 
%Portfast has been configured on FastEthernet0/15 but will only 
have effect when the interface is in a non-trunking mode. 
//驗證VLAN的配置 
3550#show vlan brief 
VLAN Name Status Ports 
---- -------------------------------- --------- ------------------------------- 
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4 
Fa0/5, Fa0/6, Fa0/7, Fa0/8 
Fa0/9, Fa0/10, Fa0/11, Fa0/12 
Fa0/14, Fa0/16, Fa0/17, Fa0/18 
Fa0/23, Gi0/1, Gi0/2 
100 renshibo active Fa0/13 
200 shichangbo active Fa0/15 
1002 fddi-default act/unsup 
1003 token-ring-default act/unsup 
1004 fddinet-default act/unsup 
1005 trnet-default act/unsup 

第三步 配置SVI(交換虛擬接口) 

復制代碼
代碼如下:

3550#conf t 
Enter configuration commands, one per line. End with CNTL/Z. 
//進入VLAN 100 虛擬接口下 
3550(config)#int vlan 100 
//增加接口描述,以便將來排錯更加方便 
3550(config-if)#description Connection to renshibo 
//這里配置的IP地址就是人事部PC的默認網關地址,如果VLAN接口不配置IP地址,后面的DHCP配置中,PC能否獲得IP地址嗎?? 
3550(config-if)#ip add 192.168.0.1 255.255.255.0 
3550(config-if)#no sh 
3550(config-if)#int vlan 200 
00:13:22: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan200, changed state to up 
3550(config-if)#description Connection to shichangbo 
3550(config-if)#ip add 172.16.0.1 255.255.255.0 
3550(config-if)#no sh 
3550(config-if)# 
3550#conf t 
//開啟catalyst 3550三層交換路由功能(默認是關閉的) 
請問cisco catalyst那些型號交換機是三層交換機? 
3550(config)#ip routing 
3550(config)#exit 
3550#sh ip route 
//兩條直連路由條目 
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP 
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP 
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 
ia - IS-IS inter area, * - candidate default, U - per-user static route 
o - ODR, P - periodic downloaded static route 
Gateway of last resort is not set 
172.16.0.0/24 is subnetted, 1 subnets 
C 172.16.0.0 is directly connected, Vlan200 
C 192.168.0.0/24 is directly connected, Vlan100 
Designated bridge has priority 32768, address ccd1.0a80.0000 
Designated port id is 129.65, designated path cost 0 
Timers: message age 0, forward delay 0, hold 0 
Number of transitions to forwarding state: 1 
BPDU: sent 993, received 92 

第四步 在Catalyst 3550上配置DHCP,以便于VLAN100和VLAN200下客戶端獲得IP地址,掩碼,網關,DNS等 

復制代碼
代碼如下:

//全局下打開DHCP服務.默認是開啟的嗎?那為什么還要需要開啟了? 
3550(config)#service dhcp 
//關閉dhcp 客戶端IP沖突日志記錄信息 
3550(config)#no ip dhcp conflict logging 
//配置地址池名稱,地址池名稱為任意字符(這里定義的名字VLAN的名稱) 
3550(config)#ip dhcp pool renshibo 
//配置PC所獲得網段地址范圍,和掩碼,(這里有幾種命令語句格式) 
(network 192.168.0.0 255.255.255.0) 
3550(dhcp-config)#network 192.168.0.0 /24 
//配置網關地址 
3550(dhcp-config)#default-router 192.168.0.1 
//配置DNS(域名解析服務器)可選配置 
請問什么時候PC需要配置DNS地址?局域網通訊需要嗎? 
3550(dhcp-config)#dns 218.30.19.40 61.134.1.4 
//配置域名 
3550(dhcp-config)#domain-name www.cisco.com 
//配置地址租期為永久 
3550(dhcp-config)#lease infinite 
3550(dhcp-config)#exit 
//配置排除的IP地址范圍,不從地址池內分配的地址,不配置排除地址可以嗎? 
3550(config)#ip dhcp excluded-address 192.168.0.1 
3550(config)#ip dhcp pool shichangbo 
3550(dhcp-config)#network 172.16.0.0 /24 
3550(dhcp-config)#default-router 172.16.0.1 
3550(dhcp-config)#dns 218.30.19.40 61.134.1.4 
3550(dhcp-config)#domain-name www.cisco.com 
3550(dhcp-config)#lease infinite 
3550(dhcp-config)#exit 
3550(config)#ip dhcp excluded-address 172.16.0.1 

第五步 在市場部PC上驗證是否能從catalyst 3550獲得IP地址, 如圖:開始-運行-cmd-ipconfig /all 
三層交換機,VLAN,通信配置 

第六步 在Catalyst 3550查看PC獲得的IP地址是否正確 

復制代碼
代碼如下:

//查看DHCP綁定信息 
3550#sh ip dhcp binding 
IP address Client-ID/ (MAC地址) Lease expiration Type 
Hardware address 
172.16.0.2 0100.16d3.249f.fd Infinite Automatic 
192.168.0.2 0100.1641.15e8.5c Infinite Automatic 

第七步 在交換機測試是否可以ping通市場部和人事部PC 

復制代碼
代碼如下:

3550(config)#exit 
3550# 
00:26:41: %SYS-5-CONFIG_I: Configured from console by console 
3550#ping 172.16.0.2 
Type escape sequence to abort. 
Sending 5, 100-byte ICMP Echos to 172.16.0.2, timeout is 2 seconds: 
!!!!! 
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms 
3550#ping 192.168.0.2 
Type escape sequence to abort. 
Sending 5, 100-byte ICMP Echos to 192.168.0.2, timeout is 2 seconds: 
!!!!! 
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms 

第八步 在市場部PC上用ping命令測試是否可以ping通VLAN100(人事部) 下PC 如圖:測試結果如下,可以ping通,實驗現象成功! 

三層交換機,VLAN,通信配置 

本文出自 “王萬利的博客” 博客


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 泰来县| 安国市| 景德镇市| 龙川县| 蓬安县| 新巴尔虎右旗| 壶关县| 岳阳市| 永年县| 林口县| 高青县| 东阿县| 临海市| 临猗县| 西华县| 黄石市| 云林县| 百色市| 仙游县| 岐山县| 遂平县| 吉隆县| 朝阳县| 长顺县| 明星| 望奎县| 祁阳县| 德钦县| 酉阳| 榆社县| 清水河县| 盈江县| 新河县| 固原市| 武威市| 灵台县| 广西| 克拉玛依市| 通榆县| 深水埗区| 景德镇市|