loopback bad mask?

mguymguy Member Posts: 167 ■■■□□□□□□□
I want to create loopbacks with /24 to simulate networks

10.1.1.0 /24
10.1.2.0 /24
10.1.3.0 /24

I try:

int lo 0
ip add 10.1.1.0 255.255.255.0

and I get


Bad mask /24 for address 10.1.1.0

So, how do I do this? or is this even possible?

Comments

  • NetworkVeteranNetworkVeteran Member Posts: 2,338 ■■■■■■■■□□
    mguy wrote: »
    I want to create loopbacks with /24 to simulate networks

    10.1.1.0 /24

    ip add 10.1.1.0 255.255.255.0

    Bad mask /24 for address 10.1.1.0
    You want the command "ip address 10.1.1.1 255.255.255.0"

    You can't assign network addresses to interfaces; you can only assign host addresses. The act of assigning that first host to the 10.1.1.1 subnet implicitly creates that subnet. Check your routing table. :)
Sign In or Register to comment.