Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
Adding an Alias to Network Bridge
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Adding an Alias to Network Bridge

  1. #1

    Adding an Alias to Network Bridge

    Hey,

    I need a networking guru's help.

    I am trying to setup a bridge and use virtual machines under Ubuntu Jaunty Server, but am having lots of troubles.

    I am working remotely on my server through SSH, and as it is 3800 KMs away, I have no physical access.


    This is my interfaces file (obviously, X and Y are valid numbers):

    Code:
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    auto br0
    iface br0 inet static
        address X.Y.61.18
        network X.Y.61.0
        netmask 255.255.255.224
        broadcast X.Y.61.31
        gateway X.Y.61.1
        bridge_ports eth0
        bridge_stp off
        bridge_maxwait 5
    
    auto br0:0
    iface br0:0 inet static
        address X.Y.62.118
        netmask 255.255.255.248
        gateway X.Y.62.118
    As it is, I can't access the server at all. It doesn't reply to ping, and logging in by SSH times out. Luckily, I wrote a script to change the interfaces file and reboot, so I can work with it some more.

    If I comment out br0:0, it works fine.

    Now, the data center where the server is located has given me the information which I used, with secondary IP addresses:

    X.Y.62.113-118

    As I only have a gateway for the primary address, I need to fix the bridge to get it running.

    Any suggestions? Thanks

  2. #2
    Administrator Advisor peter's Avatar
    Join Date
    Apr 2004
    Posts
    882
    I've never tried this before, but I would think that with bridging you would have to define more than one ethernet interface somewhere.

    My sites:
    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
    -
    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

  3. #3
    Yes, you're right. I thought the alias would be sufficient, but it wasn't.

    Code:
    br0       Link encap:Ethernet  HWaddr 00:22:15:98:37:1a  
              inet addr:X.Y.61.18  Bcast:174.142.61.31  Mask:255.255.255.224
    vnet0     Link encap:Ethernet  HWaddr 16:ee:9a:43:ba:da  
              inet addr:X.Y.62.118  Bcast:174.142.62.119  Mask:255.255.255.248
    I now have a second (virtual) interface.

    Code:
    $ brctl show
    bridge name    bridge id        STP enabled    interfaces
    br0        8000.00221598371a    no        eth0
                                vnet0
    Bridge is setup.

    IP forwarding is enabled in sysctl.conf ...

    Yet I am not sure what to do now.

    Pinging gives me a "Destination Host Unreachable"

    Code:
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    X.Y.62.112      *               255.255.255.248 U     0      0        0 vnet0
    X.Y.61.0        *               255.255.255.224 U     0      0        0 br0
    192.168.122.0   *               255.255.255.0   U     0      0        0 virbr0
    default         *               0.0.0.0         UG    100    0        0 br0
    Routing seems correct, but I am no expert.

    I tried setting my gateway on the virtual machine to the address of vnet0 (X.Y.62.118), and to the address I assigned it (X.Y.62.114). Nothing seems to work.

    I also tried setting the VPS to the same IP address (.118). When I SSH'd into it, I was connected to the host and not the guest.

    Any ideas, anyone? I hope there are a few networking gurus here, because I am really at a loss.

  4. #4
    Administrator Advisor peter's Avatar
    Join Date
    Apr 2004
    Posts
    882
    What are you trying to ping? The default gateway doesn't seem to be defined, it should be pointing to the IP address of a router.

    My sites:
    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
    -
    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

  5. #5
    I'm trying to ping the VPS.

    I set the default gateway for it when I built it using vmbuilder, as per these instructions:

    https://help.ubuntu.com/9.04/serverg...vmbuilder.html


    I tried to set it to the address of vnet0, which should be forwarding to eth0 on the virtual machines. I also tried setting it to the address of eth0 on the virtual machine and to the address of br0, all to no avail.

    The default gateway is set properly on the host system, as I can SSH into it, ping it, etc.

    The gateway for the guest systems is what I am trying to figure out. To me, it should be set to vnet0, as vnet0 should be doing the routing, as they are virtual machines and cannot be linked to a physical router.

    vnet0 should forward all requests from br0, which bridges the eth0 (physical) and vnet0 (virtual) adapters, to the eth0 adapters of the appropriate virtual machine.

    The problem is that my secondary addresses and my primary address, for the virtual machines and the host system respecitvely are on a different subnet, and I need to get the routing to work properly for the virtual machines to be accessible.

  6. #6
    Administrator Advisor peter's Avatar
    Join Date
    Apr 2004
    Posts
    882
    I'm not sure I understand. A bridge is a device on which all interfaces reside on the same subnet. Are you sure you don't want to configure routing?

    My sites:
    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
    -
    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

  7. #7
    I'm not sure of anything, at this point :P

    Yeah, it probably is routing I'm struggling with. I tried to add another route to the table for the secondary network, but that didn't help.

    I think what I may need is in fact a tunnel I can attach KVM to.

  8. #8
    Quote Originally Posted by peter View Post
    A bridge is a device on which all interfaces reside on the same subnet.
    Actually, a bridge just forwards packets at the ethernet level so it doesn't care about the subnet or anything else. So I think my bridge should work with IP Forwarding enabled and the correct route.

    http://www.linuxfoundation.org/en/Net:Bridge

    I also mounted the qcow2 disk image with nbd-client, so I can now read the log / configuration files in the virtual server. Hopefully, I will find something somewhere that eluded me

  9. #9
    I finally got it!

    It seems that the only way for me to add an alias to a bridge is manually.

    Code:
    sudo ifconfig br0:0 X.Y.62.118 netmask 255.255.255.248 broadcast X.Y.62.119
    With the br0 bridge set to the primary IP and IP forwarding enabled, it works like a charm

    Now I just have to automate it in some scripts and I should be good to go.

  10. #10
    Administrator Advisor peter's Avatar
    Join Date
    Apr 2004
    Posts
    882
    Excellent to hear! I was wondering why the interfaces file wouldn't work. Do you know of any other way to get it automated to work. I'd think the interfaces file would be the most fool proof.

    My sites:
    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
    -
    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Similar Threads

  1. Owner for the alias list in sendmail
    By honey bee in forum Linux - Software, Applications & Programming
    Replies: 0
    Last Post: 04-17-2007, 11:32 AM
  2. Qmail Alias with period
    By infinite_root in forum Linux - Hardware, Networking & Security
    Replies: 3
    Last Post: 01-16-2004, 07:51 AM
  3. Transparent bridge firewall
    By demian in forum Security
    Replies: 3
    Last Post: 10-29-2003, 01:54 PM
  4. network\ethernet bridge
    By sujoki in forum Linux - Hardware, Networking & Security
    Replies: 13
    Last Post: 09-11-2003, 01:27 AM
  5. alias for root
    By Black666 in forum Linux - General Topics
    Replies: 4
    Last Post: 06-25-2002, 02:46 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •