LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-22-2007, 03:48 AM   #1
MarioT
Member
 
Registered: May 2004
Posts: 52

Rep: Reputation: 15
VLAN and default gateway


Distro Debian 4.0 r1. I have few VLANs. My default gateway is PC with address from one of VLAN. I added default gw - 'route add default gw ip_address'. How can I do it permanently.
It seems that something like

iface vlan1250 inet static
address 10.100.250.199
netmask 255.255.255.0
up route add default gw 10.100.250.254
vlan_raw_device eth1


is not working, it doesn't want to start vlan interface this way. I've done dirty solution with script in /etc/init.d. Is there any better way.

Thanks
Mario
 
Old 10-22-2007, 10:05 AM   #2
G4george
Member
 
Registered: Nov 2005
Location: Houston, Tx
Posts: 34

Rep: Reputation: 15
check /etc/sysconfig/network-scripts.
should have file ifcfg-eth1

ifcfg-eth1 should look like.
DEVICE=eth1
HWADDR=xx:xx:xx:xx:xx
IPADDR=10.10.10.10
NETMASK=255.255.255.0
GATEWAY=10.10.10.1
ONBOOT=yes

xx is the values for your nic.
This should work.
 
Old 10-23-2007, 02:18 AM   #3
MarioT
Member
 
Registered: May 2004
Posts: 52

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by G4george View Post
check /etc/sysconfig/network-scripts.
should have file ifcfg-eth1

ifcfg-eth1 should look like.
DEVICE=eth1
HWADDR=xx:xx:xx:xx:xx
IPADDR=10.10.10.10
NETMASK=255.255.255.0
GATEWAY=10.10.10.1
ONBOOT=yes

xx is the values for your nic.
This should work.


Debian controls interfaces via just one file /etc/network/interfaces and "trick" with GATEWAY line is not working with VLANs.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
VLAN configuration - native VLAN and setting PVID kumarwaiting Linux - Networking 0 07-24-2006 02:51 AM
What is a gateway? can I have more than one gateway on a vlan? abefroman Linux - Networking 3 09-06-2005 10:43 AM
Default gateway dooda5555 Linux - Networking 1 06-17-2005 11:43 AM
how to connect a gateway linux with vlan ? ctis78 Linux - Networking 2 03-25-2005 07:28 AM
Default Gateway rrosenkoetter Linux - Networking 3 08-27-2004 08:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration