Re: attached gateways
Re: attached gateways
- Subject: Re: attached gateways
- From: Chase <email@hidden>
- Date: Tue, 21 Jun 2005 09:09:30 -0500
On Jun 21, 2005, at 8:26 AM, Daniel Sumorok wrote:
If you type "netstat -rn" at the command line you will get the
routing table. Usually, the gateway's IP address is a function of the
destination IP address, and the interface to use is a function of the
gateway's IP address. There can also be multiple gateways attached
to a
single interface. Usually, a single gateway is designated as the
"default" route, and all packets destined for that gateway are routed
through the same interface. The routing table should tell you exactly
where each packet will be routed.
thanks, daniel. that got me almost there, but not quite...
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