2 IPs 1 NIC ... define src address when going to certain h..

Archived from groups: microsoft.public.windowsnt.protocol.tcpip (More info?)

I have a system that has two IPs assigned to one NIC (IP1,
IP2). What I want to setup is when the system wants to
talk to a certain host (call it host B), I want it to use
IP2. The system uses IP1 as it's primary IP, and by
primary I mean when you do a route print, it is the one in
the interface column. This is possible in Linux with
subinterfaces, but I can do it in Windows. I know that I
could add a second card, but I don't have the PCI slots
available.

Hopefully this will better show what I want to do:

C:\Documents and Settings\Administrator>ipconfig

Windows IP Configuration


Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.1.11
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.1.10
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1

C:\Documents and Settings\Administrator>netstat -ar
....
Network Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.10 30
127.0.0.0 255.0.0.0 127.0.0.1
127.0.0.1 1
192.168.1.0 255.255.255.0 192.168.1.10
192.168.1.10 30
192.168.1.10 255.255.255.255 127.0.0.1
Default Gateway: 192.168.1.1
1 answer Last reply
More about define address
  1. Archived from groups: microsoft.public.windowsnt.protocol.tcpip (More info?)

    Sorry but I hit return accidently.

    here is what i wanted to write before:


    C:\Documents and Settings\Administrator>netstat -ar

    Network Destination Netmask Gateway Interface Metric
    0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.10 30
    192.168.1.10 255.255.255.255 127.0.0.1 127.0.0.1 30
    192.168.1.11 255.255.255.255 127.0.0.1 127.0.0.1 30

    (I want to add a route to 192.168.1.12 but I want the
    source IP address when I do to be 192.168.1.11 not
    192.168.1.10)
    C:\Documents and Settings\Administrator>route add
    192.168.1.12 MASK 255.255.255.255 192.168.1.11


    C:\Documents and Settings\Administrator>netstat -arn

    ....
    Network Netmask Gateway Interface Metric
    ....
    192.168.1.12 255.255.255.255 192.168.1.10 192.168.1.10 1

    ....
Ask a new question

Read More

Windows