Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am using fedora7. My eth0 is connected to Internet and eth1 is connected to LAN. I have used following commands:
#vconfig add eth1.2
#vconfig add eth1.3
for adding vlan 2 and vlan 3.
Further for assigning IP addresses
#ifconfig eth1.2 192.168.2.1 netmask 255.255.255.0 up
#ifconfig eth1.3 192.168.3.1 netmask 255.255.255.0 up
#route add -net 192.168.2.0 netmask 255.255.255.0 up
#route add -net 192.168.3.0 netmask 255.255.255.0 up
After this I connected my Windows XP professional machine directly with Fedora7 server and assigned it an IP 192.168.2.55 with netmask 255.255.255.0 BUT it did not ping either way.
I even making changes to /etc/sysconfig/network-scripts/ifcfg-eth1.2
DEVICE=eth1.2
IPADDR==192.168.2.1
NETMASK=255.255.255.0
VLAN=yes
ONBOOT=yes
BOOTPROTO=none
followed by service network restart command.
But still fedora7 did not ping Windows XP machine and Windows XP did not ping Fedora Machine.
what do you mean "connected directly"? with a xover cable? if so then that's never going to work. your vlan's on the linux side require a trunked connection, IEEE802.1q, to handle multiple VLans on the switch side. what switch are you using?
i'd also suggest that you back up a long way, it's not that they don't work with "windows clients" that makes no sense. if these clients are connecting to a switch then they need a single untagged connectino and the switch needs to connect the untagged links to the tagged trunk for the server side. it's impossible for a client operating system to know anything about the existinance of vlands on a server side link. The fact that you've not even mentioned a switch at all leads me to think you're not clear on what vlans are for or how they work.
Hi acid_kewpie,
I am using L3 3750 Switch which is further connected to 2950SX.
The configuration of 3750 is as under:
I am using port 10 as inlet to switch and port 12 as outlet to 2nd gigaport of 2950SX.
acid_kewpie,
Many thanks for your guidance.
VLAN's are working now on both layer 3 and layer 2 switches.
My next question is connecting these vlans with WAN.
eth0 is connected to Internet.
eth1.2,1.3,1.4,1.5 is connected to LAN.
So far I have tried this:
Configured my eth0 with the details provided by ISP. Internet
on the server is working fine.
it looks as if your return packets are all going to be dropped. rules at that level are not stateful, so a packet is probably being allowed from the inside vlan's out to the WAN, but the return traffic is going to be dropped. i'd suggest not using specific forward entries yet, just hit the ip_forward file as is and you should be able to then route between the vlans. if you don't want to route between each internal network, then you can filter that at a later stage, but the next level is routing without security.
Thanks Once again Acid Kewpie.
I will try your suggestion.
Just have a look at layer 3 details as under:
The IP address of interface VLAN 2 is 192.168.2.1
and the IP address of eth1.2 is 192.168.2.5
I used the gateway on windows client machines as 192.168.2.1
is this OK or I should use 192.168.2.5 which is the IP of eth1.2
Also, I will just use #echo 1 > /proc/sys/net/ipv4/ip_forward
and in line with your suggestion I will remove these commands:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.