Ahhhhh what is this

Wednesday, May 8th, 2013 10:54 pm
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
[personal profile] afuna

I'm switching my laptop from VMWare to VirtualBox (basically cloning the already working version from my desktop, which has things properly set up for email, etc) -- and ran into issues with networking. And at first I thought it was because I hadn't set up dnsmasq properly, or that it was this old issue with setting up dhcp that I vaguely remembered having to deal with the first time.

But after fixing all that, still nothing. And uh. It turns out the solution was to rename the interfaces from eth0/eth1 to eth4/eth5.

I have no idea what just happened, other than that my computers have decided that it's fun to mess with me.

(I think the main reason I'm leery of sysad stuff is that every time I come back to edit something, I have to basically start from scratch. I should try to figure out how to easily document my actions when I work on the sysadmin side of things, so I can find out what I just did, two months from now.

It's really easy for code, e.g., git status, git stash, but the same trial and error approach I do for code just leads to confusion when I try to remember what I just did when it comes to working on my system...)

(I'm beginning to think that the other reason I find sysadminning so hard is that I only rarely can figure out from the instructions which parameters are arbitrary, and which parameters must be based on values from your system. For instance, in:

VBoxManage dhcpserver add –netname (the internal network name e.g. intnet) –ip <your RFC 1918 address> (e.g. 192.168.x.x, 10.x.x.x, 172.16.x.x)\
–netmask <your subnet mask> (e.g. 255.255.255.0) –lowerip <your lower IP range> (e.g. 192.168.1.2) –upperip <your upper IP range> (e.g. 192.168.1.254)
  • --netname is arbitrary
  • --ip is sort of arbitrary, but I thought it had to be based off an already assigned ip address
  • -- netmask is always just 255.255.255.0 for my purposes
  • --lowerip/--upperip are arbitrary, but since I was confused about --ip before...

Also in the GUI, there's an adapter IP and the DHCP server IP, and it's not clear whether the --ip is for the former or the latter. It turns out it's the former, but good heavens how do people know? I basically had to plug in reasonable-seeming values and restarting stuff to test, with the only feedback being that it either failed or succeeded, and no way of telling which of the inputs was the reason for the failure, or if it was none of those.

UGH. Not my favorite thing in the world.)

Date: 2013-05-08 04:50 pm (UTC)
exor674: Computer Science is my girlfriend (Default)
From: [personal profile] exor674
But after fixing all that, still nothing. And uh. It turns out the solution was to rename the interfaces from eth0/eth1 to eth4/eth5.

This is because modern Linux pin the interface names based on MAC address.
Check "/etc/udev/rules.d/70-persistent-net.rules"

Date: 2013-05-08 05:41 pm (UTC)
exor674: Computer Science is my girlfriend (Default)
From: [personal profile] exor674

You can also use that to name the interfaces whatever you want.

For example, on my router

# PCI device 0x8086:0x10d3 (e1000e) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?", ATTR{address}=="00:22:4d:88:da:27", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth", NAME="ext0"

# PCI device 0x8086:0x10d3 (e1000e) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?", ATTR{address}=="00:22:4d:88:da:24", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth", NAME="lan0"

Which names the interface that goes to the DSL modem as 'ext0', and the interface that goes to my local network as 'lan0'

Edited (wrath of the markdown) Date: 2013-05-08 05:41 pm (UTC)

Date: 2013-05-08 06:28 pm (UTC)
alierak: (Default)
From: [personal profile] alierak
My rule of thumb? All bits are arbitrary -- never assume.

Date: 2013-05-08 06:48 pm (UTC)
azurelunatic: Vivid pink Alaskan wild rose. (Default)
From: [personal profile] azurelunatic
So about a ~year ago at work, there was a design review with ~4 checkboxes that the system administrator could turn on.

"Are these checkboxes 'and' or 'or'?" I asked.

"And," the designer said.

"How does the sysadmin know?" I asked.

"They'll just know," the designer said. "From experience."

"What if they're new?" I asked.

"They'll find out," the designer said. "But new people don't use this."

"Really?" I asked.

A 10-minute argument amongst the entire team ensued, loudly. It was glorious. The designer took his design back to dev for further review.

Date: 2013-05-09 03:41 am (UTC)
shadowspar: Side-on picture of a Commodore 64c computer (commodore 64c)
From: [personal profile] shadowspar

(I think the main reason I'm leery of sysad stuff is that every time I come back to edit something, I have to basically start from scratch. I should try to figure out how to easily document my actions when I work on the sysadmin side of things, so I can find out what I just did, two months from now. ...

OMG, yes this. I found myself in exactly the same boat years ago -- I'd set up, like, a caching DNS server, or some kind of network config, or whatever, and then forget all about it...then 18 months later I would have to do it over again.

So, I created a notes/ directory full of plaintext cribnotes. Now, every time I set up something new or learn something important, I add to my little stash of notes. Since it's just text files, it doesn't take up much space, and it's easy to search with find and grep.

Over time, it's evolved to the point where I've broken it down into subdirectories: hardware/, i18n/, programming/, sysadmin/, travel/, ...etcetc. Now the whole thing is stored in git, so I sync it to pretty much every computer I use on a regular basis -- my desktop, laptop, work machines, even my mp3 player.

It takes a little bit to get into the habit, and a few minutes here and there to update things, but it's worth it when, within a few seconds, you can recall the arcane command required to download a realplayer stream, or the name of that amazing pizza place waaay out in the suburbs of Chicago that you ate at in 2006. ^_^;