[Xorp-users] static configuration

victor omwando vommwa at yahoo.com
Fri Jun 26 07:35:40 PDT 2009


First off, the XORP manual is a very good place to start if you're a beginner like me; it's a relatively light read, and the individual chapters are short and to the point. For your use, I'd recommend chapters 2 and 3, just go get a good feel of how to configure interfaces. First off, if you're configuring the interface that is currently being used by the system, make sure there is no mismatch in the 'address', 'prefix-length' and 'broadcast' segments.  The broadcast segment is mandatory when you're configuring an IPv4 address in XORP. Also, at each level in the interface configuration hierachy, (interface, vif and address) it is necessary to include the line 'disable: false', if you want to enable the interface, vif and address respectively. Also, it is not mandatory in some places, but it is good practice to include quotations for arguments that are described as text in the manual , eg 'interface "eth0" '. It's not mandatory here, but trust me, when
 you get to some policy and protocol sections, it might make you pull hairs forgetting this fact with some fields. Again, consult the manual to get the syntax for various sections, and where text fields are and are not required. So, assuming that your address settings are the same as the computer you are using, the config 'should' look like this:


interfaces {
 
    interface "eth0" {
      disable: false

       vif "eth0" {
              address 192.168.1.100 {
                        prefix-length: 24
                        broadcast: 192.168.1.255
                        disable: false

               }
         }
    }
}


fea {
      unicast-forwarding4 {
                 disable: false
       }
}
 
protocols {
      static {
          route 192.168.1.101/24 {
                   next-hop: 192.168.1.100
          }
       }}

Also, if you have a physical interface that has only one virtual interface, and you want that interface to use the same configuration that the system has assigned to the router, you can use the 'default-system-config' line to specify that the configuration should be obtained form the default system config (again, assuming that the physical interface has already been configured). NOTE that is  the 'default-system-config' is used, then the 'vif' and 'address' sections must not be configured. Thus:


interfaces {
 
    interface "eth0" {
    default-system-config
     disable: false      

    }
}


fea {
      unicast-forwarding4 {
                 disable: false
       }
}
 
protocols {
      static {
          route 192.168.1.101/24 {
                   next-hop: 192.168.1.100
          }
       }
}

This is just if you have physical interfaces that do not have any virtual interfaces. If you have vifs, then you can't use this. Sorry for being wordy, but I hope this helps.




________________________________
From: Robert Appleton <appletrp at gmail.com>
To: victor omwando <vommwa at yahoo.com>
Sent: Friday, June 26, 2009 7:42:32 AM
Subject: Re: [Xorp-users] static configuration


Here it is below, any help to get this working is appreciated.
 
 
interfaces {
 
    interface eth0 {
       vif eth0 {
              address 192.168.1.100 {
                        prefix-length: 24
               }
         }
    }
}
 
fea {
      unicast-forwarding4 {
                 disable: false
       }
}
 
protocols {
      static {
          route 192.168.1.101/24 {
                   next-hop: 192.168.1.100
          }
       }
}


On Thu, Jun 25, 2009 at 4:35 PM, victor omwando <vommwa at yahoo.com> wrote:

I can't see your config file, can you copy and paste it on the email body and resend the email? I'm assuming it's pretty small.



________________________________
 From: Robert Appleton <appletrp at gmail.com>
To: xorp-users at xorp.org
Sent: Thursday, June 25, 2009 2:48:49 PM
Subject: [Xorp-users] static configuration
 


I just want to set up a basic static configuration so that I can start messing with different things. How do I make the configuration file? I have it set to eth0 but it says it can not add my IP address. How do you know what IP address to put down. I'm running Fedora 10 and I'm new to this. Any help is appreciated, let me know if I need to include more information. Thanks.
 
- Robert Appleton


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-users/attachments/20090626/ef01f89a/attachment.html 


More information about the Xorp-users mailing list