亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

Chinaunix

標(biāo)題: vconfig設(shè)置vlan不通 [打印本頁]

作者: taichilau    時(shí)間: 2009-07-25 14:41
標(biāo)題: vconfig設(shè)置vlan不通
網(wǎng)卡eth2的真實(shí)ip:192.168.0.1
vconfig add eth2 1
ifconfig eth2.1 192.168.18.1
pc通過vlan交換機(jī)接入eth2,無論windows還是linux當(dāng)pc設(shè)為192.168.0.x時(shí) 192.168.0.1和192.168.18.1均能ping通,設(shè)為192.168.18.x時(shí)192.168.0.1和192.168.18.1均不能ping通
請大蝦指教
另外哪位大蝦能講講基于port和基于802.1q的vlan的區(qū)別和設(shè)置,不勝感激!!
作者: ssffzz1    時(shí)間: 2009-07-25 15:19
帖交換機(jī)配置,和linux的vconfig配置過程。
作者: taichilau    時(shí)間: 2009-07-25 15:55
交換機(jī):netgear fs726t smart switch
新建2個(gè)vlan  vlan id為15和19,vlan15包括9和15端口,vlan19包括9和19端口,9,15,19端口均設(shè)為“U”,端口15的pvid為15,端口19的pvid為19,其余端口的pvid為1。端口9用于連接網(wǎng)關(guān)設(shè)備的eth2端口

eth2端口的ip為192.168.0.1
設(shè)置過程:
vconfig add eth2 1
ifconfig eth2.1 192.168.18.1

-bash-3.2# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:E0:81:44:72:0C  
          inet addr:192.168.19.138  Bcast:192.168.19.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:42521 errors:0 dropped:0 overruns:0 frame:0
          TX packets:45070 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:31041030 (29.6 MiB)  TX bytes:7377977 (7.0 MiB)

eth2      Link encap:Ethernet  HWaddr 00:E0:81:44:72:0E  
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:34067 errors:0 dropped:0 overruns:0 frame:0
          TX packets:34963 errors:2 dropped:0 overruns:0 carrier:2
          collisions:0 txqueuelen:100000
          RX bytes:6236377 (5.9 MiB)  TX bytes:30182918 (28.7 MiB)

eth2.1    Link encap:Ethernet  HWaddr 00:E0:81:44:72:0E  
          inet addr:192.168.18.1  Bcast:192.168.18.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:289 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:10524 (10.2 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1701 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1701 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:142712 (139.3 KiB)  TX bytes:142712 (139.3 KiB)

-bash-3.2# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.19.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.18.0    0.0.0.0         255.255.255.0   U     0      0        0 eth2.1
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth2
0.0.0.0         192.168.19.16   0.0.0.0         UG    0      0        0 eth0
作者: ssffzz1    時(shí)間: 2009-07-25 16:09
VLAN 15 和 VLAN19的IP地址段分別是???

你的vconfig配置方法有問題。
作者: taichilau    時(shí)間: 2009-07-25 16:13
需要在交換機(jī)上設(shè)vlan的ip嗎?

請問vconfig的配置哪里有問題
作者: ssffzz1    時(shí)間: 2009-07-25 16:23
你的VLAN 15 和 VLAN 19總要有個(gè)網(wǎng)段吧? 連各IP地址段都沒有你的ETH2子接口如何配置啊。
作者: taichilau    時(shí)間: 2009-07-25 16:28
vlan15是192.168.18.0/24網(wǎng)段  vlan19就用eth2真實(shí)網(wǎng)卡的網(wǎng)段192.168.0.0/24,我的交換機(jī)ip是192.168.19.251,跟這個(gè)有關(guān)系嗎
作者: ssffzz1    時(shí)間: 2009-07-25 16:37
封TRUNK打VLAN TAG你說有沒有關(guān)系。

vconfig add eth2 15
vconfig add eth2 19

/etc/init.d/iptables stop

ifdown eth2
ifconfig eth2 up

ifconfig eth2.15 192.168.18.x netmask 255.255.255.0
ifconfig eth2.19 192.168.19.x netmask 255.255.255.0


自己參考一下吧。具體參數(shù)自己修改。


另外:

“vlan19就用eth2真實(shí)網(wǎng)卡的網(wǎng)段192.168.0.0/24,我的交換機(jī)ip是192.168.19.251” 這句話矛盾。
作者: taichilau    時(shí)間: 2009-07-25 16:58
非常感謝,“封TRUNK打VLAN TAG你說有沒有關(guān)系”這句我不太明白,需要把端口設(shè)為“T”嗎
作者: taichilau    時(shí)間: 2009-07-25 20:32
還是ping不通,發(fā)現(xiàn)linux虛擬的網(wǎng)卡不知道為什么不好用,如果eth2是192.168.0.2,eth2.1是192.168.1.2,如果我的pc設(shè)為192.168.0.x的ip,192.168.0.2和192.168.1.2都能ping通,換成192.168.1.x的ip兩個(gè)地址均ping不通,雙機(jī)直連也不通,大家沒碰到過嗎,太奇怪了
作者: ssffzz1    時(shí)間: 2009-07-25 20:58
哎?磥砟氵是沒明白TRUNK和VLAN以及子接口的道理。


直接建議你找CCNA的交換部分看看,外帶看一下單臂路由。

然后你就明白了。
作者: taichilau    時(shí)間: 2009-07-25 22:07
多謝




歡迎光臨 Chinaunix (http://72891.cn/) Powered by Discuz! X3.2