Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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
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.
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.
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: