how to add routing rules on vlan device?
"Brian Lu" <[email protected]> Mon, 28 Jan 2008 16:21:50 +0800
| Newsgroups | gmane.linux.drivers.vlan |
|---|---|
| Message-ID | <066e01c86187$2685c7c0$3000a8c0@Brian> |
This is a multi-part message in MIME format.
--===============0147728798==
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_066A_01C861C9.E3624C50"
This is a multi-part message in MIME format.
------=_NextPart_000_066A_01C861C9.E3624C50
Content-Type: text/plain;
charset="big5"
Content-Transfer-Encoding: quoted-printable
Hi all~
I have a problem...My linux is Fedora 5,kernel version is 2.6.17.7
i have created a vlan device eth0.2
[root@192 vlan]# cat /proc/net/vlan/eth0.2
eth0.2 VID: 2 REORDER_HDR: 0 dev->priv_flags: 1
total frames received 539
total bytes received 27268
Broadcast/Multicast Rcvd 0
total frames transmitted 0
total bytes transmitted 0
total headroom inc 0
total encap on xmit 0
Device: eth0
INGRESS priority mappings: 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0
EGRESSS priority Mappings:
I type the commands as follows:=20
[root@192 vlan]# ip address add 192.168.2.254 dev eth0
[root@192 vlan]# ip route add 192.168.2.0/24 table 254 dev eth0 =
[Work]
.........................................................................=
...............................
[root@192 vlan]# ip address add 192.168.3.254 dev eth0.2
[root@192 vlan]# ip route add 192.168.3.0/24 table 254 dev eth0.2
RTNETLINK answers: Network is down =
[Not Work]
why can't I add routing rules on the vlan device? and how can i make it =
work?
thank you very much....
Best regards,=20
Brian Lu
------=_NextPart_000_066A_01C861C9.E3624C50
Content-Type: text/html;
charset="big5"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dbig5">
<META content=3D"MSHTML 6.00.6000.16587" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Hi all~</FONT></DIV>
<DIV><FONT size=3D2>I have a problem...My linux is Fedora 5,kernel =
version is=20
2.6.17.7</FONT></DIV>
<DIV><FONT size=3D2>i have created a vlan device =
eth0.2</FONT></DIV>
<DIV><FONT size=3D2>[root@192 vlan]# cat =
/proc/net/vlan/eth0.2<BR>eth0.2 =20
VID: 2 REORDER_HDR: 0 dev->priv_flags:=20
1<BR> total frames=20
received =20
539<BR> total =
bytes=20
received =20
27268<BR> Broadcast/Multicast=20
Rcvd =20
0</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2> total frames=20
transmitted &n=
bsp;=20
0<BR> total bytes=20
transmitted &n=
bsp;=20
0<BR> =
total=20
headroom =
inc =20
0<BR> total =
encap on=20
xmit =20
0<BR>Device: eth0<BR>INGRESS priority mappings: 0:0 1:0 =
2:0 =20
3:0 4:0 5:0 6:0 7:0<BR>EGRESSS priority=20
Mappings:<BR></FONT></DIV>
<DIV><FONT size=3D2>I type the commands as follows:</FONT> </DIV>
<DIV><FONT size=3D2>[root@192 vlan]# ip address add 192.168.2.254 dev=20
eth0</FONT></DIV>
<DIV><FONT size=3D2>[root@192 vlan]# ip route add 192.168.2.0/24 table =
254 dev=20
eth0 &nb=
sp; =20
[Work]</FONT></DIV>
<DIV><FONT=20
size=3D2>................................................................=
........................................</FONT></DIV>
<DIV><FONT size=3D2>[root@192 vlan]# ip address add 192.168.3.254 dev=20
eth0.2</FONT></DIV>
<DIV><FONT size=3D2>[root@192 vlan]# ip route add 192.168.3.0/24 table =
254 dev=20
eth0.2<BR>RTNETLINK answers: Network is=20
down &nb=
sp; &nbs=
p;  =
; =
=20
[Not Work]</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>why can't I add routing rules on the vlan device? =
and how can=20
i make it work?</FONT></DIV>
<DIV><FONT size=3D2>thank you very much....</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Best regards, <BR>Brian =
Lu<BR></FONT></DIV></BODY></HTML>
------=_NextPart_000_066A_01C861C9.E3624C50--
--===============0147728798==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Vlan mailing list
[email protected]
http://www.candelatech.com/mailman/listinfo/vlan
--===============0147728798==--