Confusion with IP address object

dualarrow
2012-07-25
2013-03-05
  • dualarrow

    dualarrow - 2012-07-25

    When I define an interface that has a static address, I define the interface with the name of the device (eth1 in this case) and select "Static IP Address". I then right click and select "Add new address". In the address dialog, I give it a descriptive name, an address (lets say 203.161.1.1) and a netmask (255.255.255.252). The following looks to be what is generated for it in the fw file

    update_addresses_of_interface "eth1 203.161.1.1/30 203.161.1.2/30" ""

    an "ip addr show dev eth1" produces the following

    3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
        link/ether 00:00:24:ce:f3:9d brd ff:ff:ff:ff:ff:ff
        inet 203.161.1.1/30 brd 203.161.1.3 scope global eth1
        inet 203.161.1.2/30 brd 203.161.1.3 scope global secondary eth1

    Is it meant to assign 2 IP's to the interface even though I only assigned one ?

    I've hunted through my definitions to see if I have somehow managed to add an extra one but I cant find it. For larger subnets (eg /24) it only gets assigned a single IP.

    Any suggestions ?

    Andrew

     
  • dualarrow

    dualarrow - 2012-07-25

    SOLVED

    I eventually found the culprit. I had a NAT rule that used the other IP so the interface obviously needed to have both IPs. One for my explicit definition, and one to handle the NAT rule.

     

Log in to post a comment.