Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

On my Win7 host machine, I have two VMs which I test network/server stuff.

On one machine I created an IP alias using the following commands from http://www.yolinux.com/TUTORIALS/LinuxTutorialNetworking.html#NETWORKALIASING (edit to fit my network):

ifconfig eth0:0 192.168.10.9 netmask 255.255.255.0 broadcast 192.168.10.255
route add -host 192.168.10.9 dev eth0

I can navigate to the address in my browser and up pops the web GUI from that machine. Excellent! I checked the router to see if the IP address was registered as a static IP or whatever to the same hostname. This where I caught a snag. The aliased address isn't on the list.

So on my other machine I manually entered a static IP to test if it was just that static IPs don't show up -- In theory they should right? To get to the Internet, you have to pass the gateway which logs clients. Well that shows up on the list.

My question is: how does the router see the aliased IP? Can I port forward to that alias? Google only shows me how to create an alias, not really how the aliasing works.

share|improve this question

closed as off-topic by TomTom, Ward, Oliver, mdpc, Falcon Momot Jan 24 at 3:53

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must be relevant to professional system administration. Server Fault is dedicated to professional system and network administrators. End user and enthusiast questions are off-topic (contact your system administrator or hire a professional to help you out). Please see the Help Center for more information." – TomTom, Oliver, mdpc, Falcon Momot
If this question can be reworded to fit the rules in the help center, please edit the question.

    
Because you never stop looking, I've found out that ifconfig is actually obsolete and the command should be ip addr add 192.168.1.9/24 broadcast 192.168.1.255 label eth1:0 dev eth1 with the "/24" being shorthand for the "(sub)netmask 255.255.255.0". Not sure if the route is still required though. –  Jay Adams Jan 22 at 4:03

2 Answers 2

The router sees the aliased IP by way of the subnet. The gateway is only relevant for traffic to addresses that are not within the subnet range.

You might be confused with the router showing a list of DHCP-registered addresses. Your address, configured statically, will not be in that list. It might be in a "connected devices" list, but not DHCP.

share|improve this answer
    
I have DD-WRT flashed onto my router. When I navigate to Status>LAN and look under Active Clients, I should be able to see the aliased IP right? –  Jay Adams Jan 21 at 20:39
    
High-five! I don't have access to my router right now, but it's based on DD-WRT as well. I'm pretty sure that you should see it on the page you're describing. As for your other questions - which I think I missed - if the alias address lights up, you should be able to port forward to it. –  codenoire Jan 21 at 21:39
    
Can you confirm that for me? In my OP when I mentioned that it's "not on the list", this is exactly the list I'm talking about. –  Jay Adams Jan 22 at 3:50
    
I took a look and was surprised. I have lots and lots of VMs but had very few items in the list. You know what? I think the active clients list only shows ip addresses with open connections - "active". Got it? So as a test, what you might try is to initiate some sort of transfer against your alias address, and then quickly flip over to the active clients list to take a peek. –  codenoire Jan 22 at 6:13
    
I've been constantly ssh'ed into the machine via the 192.168.1.9 address which doesn't mark as "active". Took a long shot earlier and just port forwarded ssh which didn't work because I forgot to disable the other port forward. Having disabled the other forwarding, the ssh connect is good and the *.9 address shows on the list! So you were close codenoire, we need an outside connection to the aliased address for the router to show it. –  Jay Adams Jan 22 at 8:01
up vote 0 down vote accepted

The router sees the aliased IP as any other. Since the IP is set manually, without DHCP, you just have to know it's there; its not until that IP traverses the gateway to the outside Internet that the router adds it to the "Active Clients" list. You would have to port forward to this address and connect from the outside for it to show.

share|improve this answer
    
Setting ip address add 192.168.1.9/24 **broadcast 192.168.1.255** dev eth0 doesn't notify the network. Nor does connecting to the IP internally. –  Jay Adams Jan 22 at 8:53
    
Looking into an alternative so that you don't have to remember the aliased IP. Send ARP response to router, setup router's routing table (issuing on local machine doesn't seem to have an effect). There must be an option to piggyback off the machines constant "Active" status! –  Jay Adams Jan 23 at 6:12

Not the answer you're looking for? Browse other questions tagged or ask your own question.