Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[HOWTO] VLANs in a Snap with Gentoo
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
alterself.com
Apprentice
Apprentice


Joined: 13 Nov 2003
Posts: 175
Location: Iowa

PostPosted: Thu Jun 30, 2005 2:23 pm    Post subject: Reply with quote

great tutorial. i did as stated in the how-to to get things working and no luck....
here is what i ened up with (AND IT WORKS) after searching google and the forums
Code:

iface_eth0="172.16.191.9 brd 172.16.255.255 netmask 255.255.0.0"
vlans_eth0="1 10"
config_eth0_1="172.16.201.2 brd 172.16.255.255 netmast 255.255.0.0"
config_eth0_10="dhcp"


i KNOW there is a typo...it wont work unless there is...sound strange?
Back to top
View user's profile Send private message
gilesc
n00b
n00b


Joined: 01 Dec 2002
Posts: 40

PostPosted: Wed Jul 27, 2005 12:10 pm    Post subject: Reply with quote

alterself.com wrote:
great tutorial. i did as stated in the how-to to get things working and no luck....
here is what i ened up with (AND IT WORKS) after searching google and the forums
Code:

iface_eth0="172.16.191.9 brd 172.16.255.255 netmask 255.255.0.0"
vlans_eth0="1 10"
config_eth0_1="172.16.201.2 brd 172.16.255.255 netmast 255.255.0.0"
config_eth0_10="dhcp"


i KNOW there is a typo...it wont work unless there is...sound strange?


I believe the default netmask for the 172.16.0.0/12 public networks is 255.255.0.0 have you tried removing netmas* 255.255.0.0 from your configuration completely?

These are just parameters for the ifconfig command, have you checked how the 'ifconfig' command behaves with your typo?
Back to top
View user's profile Send private message
tecknojunky
Veteran
Veteran


Joined: 19 Oct 2002
Posts: 1937
Location: Montréal

PostPosted: Tue Sep 27, 2005 9:13 pm    Post subject: Reply with quote

My gosh! I was suprised to find post I made almost 1 year ago in this thread :lol:

I've made progress... :D although it does not work yet for the moment.

My problem is that I don't seem to be able to specify a default route. :(

Since I don't have the possibility to post here and see the error messages (I'm too lazy to note), I'll describe...

I'm configuring a bond with 'null'. Then do the bond0_vlan_thing( 2 3 ). Then do ipaddr_vlan2 and ipaddr_vlan3.

How do I specify the default route? Trying route_bond0(...) will make it be executed before the vlan's virtual nics are up, and I get some 'network unreacheable' or about.
_________________
(7 of 9) Installing star-trek/species-8.4.7.2::talax.
Back to top
View user's profile Send private message
alterself.com
Apprentice
Apprentice


Joined: 13 Nov 2003
Posts: 175
Location: Iowa

PostPosted: Wed Sep 28, 2005 1:11 pm    Post subject: Reply with quote

I as well have made progress and am working great.

Code:
vlans_eth0="10"
config_eth0="172.16.191.9 brd 172.16.255.255 netmask 255.255.0.0"
config_eth0_10="192.168.0.3 brd 192.168.0.255 netmask 255.255.255.0"
gateway="eth0.10/192.168.0.1


is my entire /etc/conf.net file

this makes me have 1 tagged vlan and one native vlan, with my gateway on vlan10.
_________________
Gentoo ROCKS!
Back to top
View user's profile Send private message
tecknojunky
Veteran
Veteran


Joined: 19 Oct 2002
Posts: 1937
Location: Montréal

PostPosted: Wed Sep 28, 2005 3:51 pm    Post subject: Reply with quote

Ok. I'll try to be reallu precice.

I have a mass storage unit for which I also want to do routing. The unit has two 1000Mbps nics and is connected to a vlan capable switch.

What I seek to accomplish is to bond together the two nics to get a pseudo 2000Mbps link, then create two "aliases" each assigned to a different vlan to isolat intranet from internet.

Here's my /etc/conf.d/net:
Code:
 modules=("iproute2")
slaves_bond0="eth0 eth1"
config_bond0=("null")
vlans_bond0="2 3"
vconfig_bond0=("set_name_type VLAN_PLUS_VID_NO_PAD")
config_vlan2=("192.168.0.4 brd 192.168.0.255 netmask 255.255.255.0")
config_vlan3=("***.***.***.*** brd ***.***.***.255 netmask 255.255.255.0")
gateway=("vlan3/***.***.***.1 mtu 296")

When I boot with those, ip addr show prints this:
Code:
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1#8 brd 127.255.255.255 scope host lo
        inet6 ::1#128 scope host
                valid_lft forever prefered_lft forever
2: bond0: <BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue
        link/ether **:**:**:**:**:** brd ff:ff:ff:ff:ff:ff
        inet6 fe80::207:e9ff:fe2e:37c8/64 scope link
                valid_lft forever prefered_lft forever
3: eth0: <BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc pfifo_fast master bond0 qlen 1000
        link/ether **:**:**:**:**:** brd ff:ff:ff:ff:ff:ff
        inet6 fe80::207:e9ff:fe2e:37c8/64 scope link
                valid_lft forever prefered_lft forever
4: eth1: <BROADCAST,MULTICAST,NOARP,SLAVE,UP> mtu 1500 qdisc pfifo_fast master bond0 qlen 1000
        link/ether **:**:**:**:**:** brd ff:ff:ff:ff:ff:ff
        inet6 fe80::207:e9ff:fe2e:37c8/64 scope link
                valid_lft forever prefered_lft forever
5: vlan2: <BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue
        link/ether **:**:**:**:**:** brd ff:ff:ff:ff:ff:ff
        inet 192.168.0.4/24 brd 192.168.0.255 scope global vlan2
        inet6 fe80::207:e9ff:fe2e:37c8/64 scope link
                valid_lft forever prefered_lft forever
6: vlan3: <BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue
        link/ether **:**:**:**:**:** brd ff:ff:ff:ff:ff:ff
        inet ***.***.***.***/24 brd ***.***.***.255 scope global vlan2
        inet6 fe80::207:e9ff:fe2e:37c8/64 scope link
                valid_lft forever prefered_lft forever
7: sit0: <NOARP> mtu 1480 qdisc noop
        link/sit 0.0.0.0 brd 0.0.0.0

ip route show gives this:
Code:
***.***.***.0/24 dev vlan3 proto kernel scope link src ***.***.***.***
192.168.0.0/24 dev vlan2 proto kernel scope link src 192.168.0.4
127.0.0.0/8 dev lo scope link

With this, I don't get the default route (even if I remove the mtu 296 part), so I tried setting it up in the postup function and it works.
Code:
postup() {
        route add default gw ***.***.***.1 mtu 296
        return 0
}

with this, the route table looks like this:
Code:
***.***.***.0/24 dev vlan3 proto kernel scope link src ***.***.***.***
192.168.0.0/24 dev vlan2 proto kernel scope link src 192.168.0.4
127.0.0.0/8 dev lo scope link
default via ***.***.***.1 dev vlan3 advmss 256

Alas, I get Network unreacheable whenever I try to communicate on the link.

(there may be a couple of typos as I had to note all of this stuff on a piece of paper and then type it down here).
_________________
(7 of 9) Installing star-trek/species-8.4.7.2::talax.
Back to top
View user's profile Send private message
alterself.com
Apprentice
Apprentice


Joined: 13 Nov 2003
Posts: 175
Location: Iowa

PostPosted: Wed Sep 28, 2005 4:54 pm    Post subject: Reply with quote

wow...sounds like an idea thats for sure. All I am doing is simple VLAN'n so I'm afraid I am outta my league here for helping you out with your problem.
I think it was this thread I posted to a while back for help about vlans, and how they woldnt work w/o a typo or two, but with the most recent baselayout that issue has gone away. yay!
_________________
Gentoo ROCKS!
Back to top
View user's profile Send private message
tecknojunky
Veteran
Veteran


Joined: 19 Oct 2002
Posts: 1937
Location: Montréal

PostPosted: Wed Sep 28, 2005 5:17 pm    Post subject: Reply with quote

:D Thanks anyway.

I guess I will copy/paste the post into a brand new thread. I really am stuck. :cry:
_________________
(7 of 9) Installing star-trek/species-8.4.7.2::talax.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum