Steve McClaren felt Derby's final pre-season fixture against Rangers was ideal preparation for the Rams ahead of the start of their Sky Bet Championship campaign next weekend.
Last season's top scorer Chris Martin scored both goals in the second half before an off-the-ball incident involving the Scotland striker and Bilel Mohsni resulted in the Rangers defender being sent off.
There was an edge to the game all afternoon as some lively challenges flew in, one of which resulted in Will Hughes and former Derby striker Kenny Miller squaring off. However, the situation was soon defused by a handshake.
Around 8,000 travelling fans in a crowd of 17,860 created a terrific atmosphere at the iPro Stadium, which McClaren said helped make the friendly feel like a season-opener.
"Sometimes pre-season games can be frustrating because you're going through the motions, but this was a real test and a game with an edge to it," said the Derby head coach, whose team kick-off their season at home to newly-promoted Rotherham in seven days' time.
"That is what we wanted, and what an atmosphere. The Rangers fans came down here in their numbers and gave their team some fantastic vocal support.
"I think that made it feel like a proper game. It was like a derby atmosphere. The first half was like a boxing match where two opponents were stood in the middle slugging it out. We said at half-time we had to slug it out and knock the opponent down, or they will do it to you.
"And in the second half we scored two well taken goals and deserved the win."
Simon Dawkins, fit again after a hip injury, looked a threat all afternoon and should have put Derby ahead early on. The midfielder pounced on a mistake from Darren McGregor and went round the goalkeeper only to see Mohsni get back to clear the ball.
Rangers squandered an equally good opportunity after 14 minutes when Fraser Aird headed wide at the far post following a cross from Miller.
Dawkins was denied again on two occasions either side of half-time. He saw an effort blocked by Cammy Bell and his follow-up header then cleared off the line by Mohsni, before drilling a low shot against a post.
Shortly afterwards, though, Martin fired home from close range from a Dawkins cross to give Derby a 58th-minute lead. And it was 2-0 in the 72nd minute as Martin latched on to a Will Hughes pass to beat Bell with a low strike.
The only negative for Derby saw Jake Buxton miss the game with a hip flexor problem and the central defender will be monitored next week ahead of the visit of Rotherham.