• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: attached gateways
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: attached gateways


  • Subject: Re: attached gateways
  • From: Daniel Sumorok <email@hidden>
  • Date: Tue, 21 Jun 2005 10:56:36 -0400 (EDT)

Hello,
	First, you should make sure that the netmask for en0 and en1 has
at least the first 24 bits set, i.e. 255.255.255.0.   This tells the
system that destination IP addresses of the form 192.168.20.x should be
routed to en0.  This will be appear in the table "link#4".  Likewise, IP
addresses of the form 192.168.21.x should be routed to en1, which the
routing table will show as "link#5".  Now, any IP addresses that do not
fall into one of those ranges need to be routed to another machine on a
locally attached network.  I believe as far as the routing table is
concerned there can only be a single route for each destination address,
so that is why you only see the 192.168.20.1 default gateway address.
	Now, I believe that all routes to non-directly connected networks
(such as the default route) are put into the routing table by some other
program.  It sounds like you wish to get information from the program that
is setting the default routes.  If, in this case, en0 goes down, this
other program will remove the 192.168.20.1 default route, and add the
192.168.21.1 default route.  I can not help with querying this other
program.  However, you must understand that as long as both interfaces are
up, the system will ignore one of the default gateways.  Additionally, I
think you can use the system control panel to order the interfaces to pick
which gateway gets used where there several to choose from.

	-Dan


> here's how my system is setup:
>
> iface  address          gateway
> en0    192.168.20.150   192.168.20.1
> en1    192.168.21.150   192.168.21.1
>
>
> i tried netstat -rn, but it wouldn't show a line for both interfaces.
>
> when running netstat -rna , i get:
>
> Internet:
> Destination        Gateway            Flags    Refs      Use  Netif
> Expire
> default            192.168.20.1       UGSc        6        7    en0
> 65.61.190.32       192.168.20.1       UGHW        6       17    en0
> 127                127.0.0.1          UCS         0        0    lo0
> 127.0.0.1          127.0.0.1          UH         15    66292    lo0
> 169.254            link#4             UCS         0        0    en0
> 192.168.0          link#5             UCS         0        0    en1
> 192.168.0.201      127.0.0.1          UHS         6       70    lo0
> 192.168.1          link#4             UCS         2        0    en0
> 192.168.1.1        link#4             UHLW        5        0    en0
> 192.168.1.201      127.0.0.1          UHS         0        0    lo0
> 192.168.1.255      ff:ff:ff:ff:ff:ff  UHLWb       1        1    en0
> 198.209.49.6       192.168.20.1       UGHW        6        7    en0
> 224.0.0.251        192.168.20.1       UGHW        2       28    en0
> 239.255.255.253    192.168.20.1       UGHW        1        9    en0
>
> the gateway for en1 says "link#5".  what is that supposed to mean?
> it should say "192.168.21.1" .
>
> i'm looking at the netstat docs, but i'm not seeing anything (except -
> a, which isn't doing what i need i to) that might list ALL interfaces
> and their corresponding gateways.  i'm getting good data for the
> "default" route, but i need all ifaces and all gateways.
>
> the system is obviously aware of the gateways that i've either
> specified in SysPrefs or that were set up for me via DHCP.
>
> that info is here on my system somewhere.
>
> how can i get ahold of it?
>
> thanks.
>
> - chase
>
>
>
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Macnetworkprog mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: [RESOLUTION-IN-SIGHT] attached gateways
      • From: Chase <email@hidden>
References: 
 >attached gateways (From: Chase <email@hidden>)
 >Re: attached gateways (From: Daniel Sumorok <email@hidden>)
 >Re: attached gateways (From: Chase <email@hidden>)

  • Prev by Date: Re: [CORRECTION] attached gateways
  • Next by Date: Re: PPP_PATH
  • Previous by thread: Re: [CORRECTION] attached gateways
  • Next by thread: Re: [RESOLUTION-IN-SIGHT] attached gateways
  • Index(es):
    • Date
    • Thread