Go Back   DaemonForums > FreeBSD > FreeBSD General

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

Thread Tools Display Modes
  #1   (View Single Post)  
Old 19th May 2015
libertas libertas is offline
New User
Join Date: Jan 2012
Posts: 7
Default How to change interface of default gateway?


# netstat -r -f inet
Routing tables

Destination        Gateway            Flags      Netif Expire
default          UGS        igb0      link#2             U          igb1
a95-95-92-226.cpe. link#2             UHS         lo0
leao               link#3             UH          lo0         link#6             UH          lo1         link#7             UH          lo2         link#8             UH          lo3        link#1             U          igb0
igb1 is set with DHCP. Default route is attributed to igb0.
# grep defaultro /etc/rc.conf
# grep igb /etc/rc.conf
ifconfig_igb0="inet netmask"
Is the default route attributed to igb0 because it's the first interface (suffixed with 0)?
How to have default route attributed to igb1 at boot time?
Reply With Quote
  #2   (View Single Post)  
Old 20th May 2015
J65nko J65nko is offline
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,503

The default route is igb0 because your /etc/rc.conf has defaultrouter="" and that IP address is only reachable through your igb0 interface.

Comment out that defaultrouter line, and the default gateway should be set by DHCP to the other interface.
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

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
Any info on OpenBSD 5.6's new default IPv6 to off change? SlyM OpenBSD General 4 2nd November 2014 09:45 PM
Changing Which Interface Is Assigned To Network Interface (physical) Port EverydayDiesel OpenBSD General 2 18th July 2014 10:25 AM
change default font of the X rex FreeBSD General 2 26th October 2008 05:54 PM
antivirus gateway milo974 OpenBSD Security 9 14th September 2008 04:02 AM
Permanently Change Default sound device. shep FreeBSD General 5 14th June 2008 05:58 PM

All times are GMT. The time now is 12:14 AM.

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