Re: gethostbyname() in Multi-homed systems...
From: Slobodan Brcin \(eMVP\) (sbrcin_at_ptt.yu)
Date: 12/17/04
- Next message: thorq2: "Re: PCI Serial Port Problem"
- Previous message: KM: "Re: PCI Serial Port Problem"
- In reply to: thammond_at_edldayton.com: "gethostbyname() in Multi-homed systems..."
- Next in thread: thammond_at_edldayton.com: "Re: gethostbyname() in Multi-homed systems..."
- Reply: thammond_at_edldayton.com: "Re: gethostbyname() in Multi-homed systems..."
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 17 Dec 2004 10:47:20 +0100
While searching for my problems I have accidentally stumbled in MSDN on article that tell following:
NetBIOS over TCP/IP (NetBT) binds to the first IP address for each network adapter only.
When a NetBIOS name registration is sent out, only one IP address is registered per adapter. This registration occurs over the IP
address that is listed first in the properties of the TCP/IP protocol for the adapter.
I hope that this is info that you needed. Now you will need to figure out how to add additional IP in order. I would attach registry
directly.
Regards,
Slobodan
Multihoming Considerations
If TCP/IP is configured for multiple network adapters, or for a single network adapter with multiple IP addresses, you must consider
the following issues:
NetBIOS over TCP/IP (NetBT) binds to the first IP address for each network adapter only.
When a NetBIOS name registration is sent out, only one IP address is registered per adapter. This registration occurs over the IP
address that is listed first in the properties of the TCP/IP protocol for the adapter.
A unique IP address and subnet mask are defined for each adapter.
For each network adapter, an instance of TCP/IP is bound to the adapter. You can choose to have IP addresses dynamically assigned by
DHCP (or APIPA if a DHCP server is not present) or defined manually as static addresses.
Domain Name System (DNS) configuration settings are global.
The settings on the DNS tab in Advanced TCP/IP Properties are used for all adapters on the computer. Therefore, for a multihomed
computer, you must carefully define options for DNS that are applicable for all adapters using TCP/IP. Usually, this means that if
you want to use DNS for name resolution with any TCP/IP connection, make sure DNS is configured.
Windows Internet Name Service (WINS) configuration settings are defined for each adapter.
The settings on the WINS configuration tab are used only for the adapter you are configuring. For example, NetBIOS over TCP/IP
(NetBT) can be enabled or disabled for each network adapter. If you enable the option Disable NetBIOS over TCP/IP for a LAN adapter,
this option is enabled only for that adapter, not for other LAN adapters on the computer.
The default gateway can be different for each adapter.
While it is possible to configure a default gateway IP address for each network interface, there is only a single active default
route in the IP route table. If there are multiple default routes in the IP route table (assuming a metric of 1), then the specific
default route is chosen randomly when TCP/IP is initialized. This behavior can lead to confusion and loss of connectivity.
It is recommended that when you are configuring a computer to be multihomed on two disjoint networks, configure a default gateway IP
on the interface that is attached to the portion of the IP internetwork that contains the most network segments. Then, either add
static routes or use a routing protocol to provide connectivity to remote networks reachable through the other interfaces.
Only one default gateway is used at a time.
Although you can have a different default gateway for each adapter, Windows 2000 Professional uses only one default gateway at a
time. This means that only certain hosts are reachable:
a.. Hosts on the local subnet
b.. Hosts that are reachable by the default gateway
As a result, in some cases you might lose network connectivity. For example, suppose your computer is first connected to the
corporate TCP/IP network and you make a PPP dial-up connection to the Internet. Your computer stops using the default gateway that
connects your computer to the corporate network and instead uses the default gateway that connects your computer to the Internet.
Therefore, you can reach hosts on your local subnet, but you cannot reach other hosts on your network.
To discover methods to access multiple gateways, see "Configure Local Route Table" later in this chapter.
<thammond@edldayton.com> wrote in message news:1103204193.852289.250430@z14g2000cwz.googlegroups.com...
> I am using XP Embedded on a multi-homed SBC. Each of the network cards
> is given its own IP address and may be given additional IP addresses as
> well. How can I specify which of these IP Addresses is used to resolve
> the system's responses to GetHostname( ) and GetHostByName( )?
>
> I tried assigning the IP addresses (to the network cards) in different
> orders thinking maybe it used a rule like "last IP added" or something
> similar to that. I tried adding an entry to the hosts file. I tried
> voodoo like unplugging one of the network connections at powerup,
> thinking that maybe it is related to "first network card found at
> startup." Nothing has worked so far. I have tried this on two cards -
> one of them works the way I want it to (uses the first NIC's first
> address), but the second one is using an address from the second NIC.
>
> If this is not the proper forum for this question, my apologies. ...
> and could you point me to a better location?
>
> Thanks.
> - Tony H.
>
- Next message: thorq2: "Re: PCI Serial Port Problem"
- Previous message: KM: "Re: PCI Serial Port Problem"
- In reply to: thammond_at_edldayton.com: "gethostbyname() in Multi-homed systems..."
- Next in thread: thammond_at_edldayton.com: "Re: gethostbyname() in Multi-homed systems..."
- Reply: thammond_at_edldayton.com: "Re: gethostbyname() in Multi-homed systems..."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|