DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 4th March 2010
xiphias xiphias is offline
Port Guard
 
Join Date: May 2008
Posts: 31
Thanked 2 Times in 2 Posts
Default bringing up vlan interfaces

Hi,

In rc.conf I have the following:

Code:
cloned_interfaces="... vlan0 vlan1 vlan2 ..." # I've removed some interfaces from here to avoid confusion
ifconfig_vr0="inet 0.0.0.0 up"
ifconfig_vlan0="vlan 999 vlandev vr0 dhcp"
ifconfig_vlan1="inet 172.16.1.1 netmask 255.255.255.0 vlan 1 vlandev vr0"
ifconfig_vlan2="inet 172.16.2.1 netmask 255.255.255.0 vlan 100 vlandev vr0"
vlan0 get's its ip by dhcp as expected, however vlan1 and vlan2 never get their static IPs assigned. They are created and configured with the correct vlan id/parent device, but the ip address is never assigned.

I have tried this variation:

Code:
ifconfig_vlan1="vlan 1 vlandev vr0 inet 172.16.1.1 netmask 255.255.255.0"
ifconfig_vlan2="vlan 100 vlandev vr0 inet 172.16.2.1 netmask 255.255.255.0"
but it makes no difference. Can anybody help?

thanks
Reply With Quote
  #2   (View Single Post)  
Old 5th March 2010
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 699
Thanked 90 Times in 81 Posts
Default

Does it work if you comment out the ifconfig_vlan0 line? If so, then there's something in the DHCP code that is overwriting or blocking the configuration of the later vlans.

Note: your ifconfig_vr0 line can be simplified to just "up".
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
  #3   (View Single Post)  
Old 5th March 2010
J65nko J65nko is online now
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,152
Thanked 182 Times in 149 Posts
Default

You could take things in own hand by configuring the devices with /etc/start_if.<interface> files.

You can use the normal ifconfig commands in this kind of file(s) just like you would do from the command line.

Several years ago on bsdforums.org I recommended usage of this file. Somebodies interface was DOWN at FreeBSD startup and as a result DHCP never worked. Just creating a /etc/start_if.xx0 with "ifconfig xx0 up" solved the problem.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #4   (View Single Post)  
Old 5th March 2010
xiphias xiphias is offline
Port Guard
 
Join Date: May 2008
Posts: 31
Thanked 2 Times in 2 Posts
Default

Thanks for the suggestions, with a bit more investigation it put me on the right path.

The interfaces mentioned in cloned_interfaces aren't being destroyed when `/etc/rc.d/netif stop` is called. The ip addresses are not assigned correctly only when the device exists before `/etc/rc.d/netif start` is called.

By creating /etc/stop_if.dev scripts for each of the devices in cloned_interfaces and explicitly destroying them there do things work as expected.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenBSD IRC channel chat about DMZ and vlan J65nko General software and network 3 25th December 2009 11:15 PM
PPTP Server, no internet connectivity (routing between interfaces?) godfrank FreeBSD Ports and Packages 5 15th April 2009 04:44 PM
PHP database interfaces TerryP Programming 6 11th September 2008 01:03 PM
How to make it work with VLAN-trunking? Seb74 OpenBSD Security 4 28th June 2008 02:08 PM
Bridge VLAN + Catalyst espenfjo FreeBSD General 2 6th June 2008 05:16 PM


All times are GMT. The time now is 01:33 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick