Ahhhhh what is this
Wednesday, May 8th, 2013 10:54 pmI'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.)
no subject
Date: 2013-05-08 04:50 pm (UTC)This is because modern Linux pin the interface names based on MAC address.
Check "/etc/udev/rules.d/70-persistent-net.rules"
no subject
Date: 2013-05-08 04:58 pm (UTC)Oh oho, thank you! That was going to bother me until I figured it out :)
(Also, hmph, the not knowing which bits are arbitrary and which bits are not strikes again! )
no subject
Date: 2013-05-08 05:41 pm (UTC)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'
no subject
Date: 2013-05-14 05:25 pm (UTC)no subject
Date: 2013-05-08 06:28 pm (UTC)no subject
Date: 2013-05-14 05:26 pm (UTC)no subject
Date: 2013-05-08 06:48 pm (UTC)"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.
no subject
Date: 2013-05-14 06:12 pm (UTC)no subject
Date: 2013-05-09 03:41 am (UTC)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. ^_^;
no subject
Date: 2013-05-14 06:14 pm (UTC)Though lately too, I've been putting non-sensitive configs in a folder in Dropbox, and using symlinks from the original location. And it occurs to me now that I could just put those under a git repo since they're all in the same folder, not scattered across /var, /usr/, /etc, etc...
(Though it wouldn't help in this case because I didn't have these ones in dropbox ^_^;;)